the only mistake I see is that you should write
if(a) EventLoop(); //if a!=0;
//instead if(!a) EventLoop();
If StartApplication() returns error you will go through AppStop()
directly. If you call StopApplication() from StartApplication() you will
not stop your app. Or I didn't understand something.
Anton
> I would like to exit my application in a check
> function inside startApplication.
> I cant use a appstopevent, cause I�m before the event
> loop. If I use a function that calls stopApplication,
> I get myself in a eternal loop...
> I jump the eventloop, eternal loop again...
> Thats my code:
> DWord PilotMain(Word action, Ptr cmdPBP, Word
> launchFlags){
> int a;
> /* check the launch coded here */
> if (action != sysAppLaunchCmdNormalLaunch)
> return 0;
>
> /* perform initialization code here */
> a= StartApplication(); //return 0 if error
>
>
> /* start event processing */
> if(!a){
> EventLoop();
> }
> /* perform program termination code here */
> StopApplication();
> }
>
> What am I missing?
>
>
> =====
> Sebasti�o J�nio Silva
> MG Brasil
>
>
>_______________________________________________________________________________________________
> Yahoo! GeoCities
> Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. �
>f�cil e gr�tis!
> http://br.geocities.yahoo.com/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palm
os.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/