Hi all, Is it possible to have a hack that also has a pilotmain() function? Maybe it is not necessary, so I will explain what I want to do, and maybe there is another way to do it.
I have a hack. It is trapping SysAppLaunch(), modifies the system, calls the original SysAppLaunch, and then restores the system. So if the Palm resets while an app is running, the system is left in the modified state, which could be problematic. Hence, I would like to respond to resets (notification occurs via a LaunchCode passed to PilotMain, I think), and detect if my Hack left the system in a modified state, and take some sort of measure to correct the system. I plan on using this system, but only checking the number when a reset occurs. Mainly because this makes the hack faster, and also because this is probably the only time the number would be (NOT(0 OR 1)). An alternate design would be to increment a number (stored in SavedPreferences or something semi-permanent like that) every time my hack modifies the system, and decrement it every time I "restore" to the previous state. With frequent checking, if the value is ever NOT equal to 0 or 1, then something has gone wrong... If a hack as a pilotMain() (which means a code segment #0, I think), does that mean it has an Icon and is launchable via the system launcher, in addition to being accessible through X-Master? Regards, Ken Mankoff http://schizophrenic.sf.net __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
