At 12:42 PM 9/14/2004, you wrote:
Hi there,
In my code, if something goes wrong, I am posting the AppStop event using the following code but it doesn't seem to be working immediately!
EventType event; event.eType = appStopEvent; EvtAddEventToQueue( &event );
Like it exits the application but before that it executes many other following instructions of the code that I don't want it to!
Sorry. The appStopEvent won't be handled until your application reenters the event queue, which usually occurs in the main loop of the program. That's the way event-driven systems work.
If you need to exit all the way, you should use a mechanism like an C++ exception, ErrThrow, or longjmp to return to your PilotMain function. That may not work well in event handlers, though, since you would have to jump across system code.
-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Fourm Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
