1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 99.2beta6 (1.42)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>The run loop of your application</TITLE>
<META NAME="description" CONTENT="The run loop of your application">
<META NAME="keywords" CONTENT="FirstGUIApplication">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta6">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="FirstGUIApplication.css">
<LINK REL="next" HREF="node5.html">
<LINK REL="previous" HREF="node3.html">
<LINK REL="up" HREF="node1.html">
<LINK REL="next" HREF="node5.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<B> Next:</B> <A NAME="tex2html63"
HREF="node5.html">Terminating your application</A>
<B> Up:</B> <A NAME="tex2html61"
HREF="node1.html">The shared application object</A>
<B> Previous:</B> <A NAME="tex2html55"
HREF="node3.html">Setting a delegate for</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00013000000000000000">
The run loop of your application</A>
</H2>
When you call <TT>NSApplicationMain ()</TT>, the GUI library ``runs''
your application. When the application is running, the GUI library
simply enters a loop waiting for events from the user (such as the
user clicking on a window, on a menu, or on the application icon). It
creates an autorelease pool at the beginning of each loop, and empties
it at the end; this means you don't have to worry about manually
creating and emptying autorelease pools in your gui application once
it is running.
<P>
Of course, if you run an application without having created any windows or
menus, the application will wait indefinitely since the user has no
means of communicating with it.
<P>
<BR><HR>
<ADDRESS>
Nicola Pero
2000-07-21
</ADDRESS>
</BODY>
</HTML>
|