On Wed, 21 Mar 2001, Wojtek Godynski wrote:
> Don't call   functions (eg. WinDrawChars) in Pilot Main before Main
> Event Loop.
> I've heard it sometimes causes crashes.

Still no dice.

"UIAppShell" (unkonwn version) has just performed an illegal
operation.  It performed a "illegal instruction".  If this is the latest
version of "UIAppShell" please report this to the application author.

Tried this with 3.3roms and 3.5ez roms.

Current code:

#include <PalmOS.h>
#include <PalmCompatibility.h>

// -----------------------------------------------------
// PilotMain is called by the startup code and implements
// a simple event handling loop.
// -----------------------------------------------------

DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
{
        EventType event;

        if (cmd == sysAppLaunchCmdNormalLaunch) {


                // Main event loop:
                do {
                        // Display a string.
                        WinDrawChars( "Hello, world!", 13, 55, 60 );

                        // Doze until an event arrives.
                        EvtGetEvent( &event, evtWaitForever );

                        // System gets first chance to handle the event.
                        SysHandleEvent( &event );

                        // Normally, we would do other
                        // event processing here.

                        // Return from PilotMain when an
                        // appStopEvent is received
                } while (event.eType != appStopEvent);
        }
        return ;
}

This is silly - the app can't get much simpler, can it?  :)

                    ______________________________________________________
-------------------< Biz: stonekeep.com | Hom: homeport.org | Mob: KB1FWR >
Dave Belfer-Shevett >-------------------^-------------------^------------<
[EMAIL PROTECTED]  /          Honk if you love peace and quiet.           \
                   \______________________________________________________/

_______________________________________________
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix

Reply via email to