Blame platform-overview/zh_CN/tour-application.page
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="task" id="tour-application" xml:lang="zh-CN">
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<link type="next" xref="tour-summary"/>
|
|
Packit |
1470ea |
<revision version="0.1" date="2013-06-17" status="stub"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Ekaterina Gerasimova</name>
|
|
Packit |
1470ea |
<email its:translate="no">kittykat3756@gmail.com</email>
|
|
Packit |
1470ea |
<years>2013</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Gordon Hill</name>
|
|
Packit |
1470ea |
<email its:translate="no">caseyweederman@gmail.com</email>
|
|
Packit |
1470ea |
<years>2013</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<include xmlns="http://www.w3.org/2001/XInclude" href="cc-by-sa-3-0.xml"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<desc>Finish the application and run the script.</desc>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>Run your application</title>
|
|
Packit |
1470ea |
<links type="prevnext" style="top"/>
|
|
Packit |
1470ea |
<links type="series" style="floatend">
|
|
Packit |
1470ea |
<title>Get started with GNOME</title>
|
|
Packit |
1470ea |
</links>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<example>
|
|
Packit |
1470ea |
Make the new object app and call the method run
|
|
Packit |
1470ea |
to run the application:
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
let app = new HelloWorld();
|
|
Packit |
1470ea |
app.application.run(ARGV);
|
|
Packit |
1470ea |
]]>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Save the script as <file>helloworld.js</file>, run
|
|
Packit |
1470ea |
<cmd>chmod +x helloworld.js</cmd> to mark it executable, and run it with
|
|
Packit |
1470ea |
<cmd>./helloworld.js</cmd>.
|
|
Packit |
1470ea |
</example>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<media type="image" src="media/glade-result.png">
|
|
Packit |
1470ea |
Screenshot of a basic window.
|
|
Packit |
1470ea |
</media>
|
|
Packit |
1470ea |
This window is generated from the <app>Glade</app> file and linked to
|
|
Packit |
1470ea |
<app>Gtk</app> events. You now have a fully functional Gtk application!
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<links type="prevnext"/>
|
|
Packit |
1470ea |
</page>
|