Hi Ben,

First of all thanks for your time and reply. Please count my vote that this is a critical issue to patch rather than just document. The database-bound form library I am working on gets and caches pointers to every object on forms supplied by the user. At runtime, it needs to rapidly switch between these forms while retaining the values displayed. I would need to re-write a lot of code and the performance would likely suffer.

This is different from other changes that involved mostly undocumented features, like MemSemaphoreReserve and UI data structure internals. For example, PalmOS 5 SDK docs do not contain any warnings about FrmInitForm. If this kind of things do not work, it would be more fair to say "It's possible for a specially written program to run both under Cobalt and legacy devices" than "Cobalt is backward compatible" :-)

Thanks!
Oleg

On Fri, 26 Mar 2004 23:29:23 -0600, Ben Combee <[EMAIL PROTECTED]> wrote:

At 08:29 PM 3/26/2004, you wrote:
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/

Reply via email to