The following 68K program only shows a blank screen when run on Cobalt simulator. If I only initialize one form, it is displayed correctly (when EvtGetEvent is first called). Any suggestions?
UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) { if (cmd != sysAppLaunchCmdNormalLaunch) return 0; FormType *frmP = FrmInitForm(MainForm); FormType *otrP = FrmInitForm(AboutForm); FrmSetEventHandler(frmP, MainFormHandleEvent); FrmSetEventHandler(otrP, MainFormHandleEvent); FrmSetActiveForm(frmP); FrmDrawForm(frmP); // Doesn't matter if this line is present or not EventType event; do { EvtGetEvent(&event, evtWaitForever); if (! SysHandleEvent(&event)) FrmDispatchEvent(&event); } while (event.eType != appStopEvent); return 0; }
Palm OS Cobalt does not seem to support having multiple top-level forms initialized at the same time. I've seen other people post with similar issues. Can you go back to a standard program flow where a form isn't initialized until its ready to be displayed? Doing the init before the frmOpenEvent is in the queue also causes problems for the PalmOne Treo 600; it doesn't initialize it's five-way navigation system correctly when that happens.
This is something I'm investigating... when I get good answers, I'll get a KB article posted on the topic.
-- Ben Combee, senior DTS engineer, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
