Thanks Matt,

But how exacly its the form going to go back to the previus form, and so on..I understand how to use FrmGotoForm somewhat from what you told me , but I can't seem to understand how does the form the the id of the previus form in memory..

Thanks





From: Matt Graham <[EMAIL PROTECTED]>
Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Subject: Re: (Newbie Problem) Form already loaded
Date: Fri, 17 Jan 2003 16:19:49 -0500

Al Smith wrote:
Thanks Matt,
do you happen to have any simple examples how to do this task.
no, but it's easy.
when you decide you want to go to a new form, call
FrmGotoForm( YourNewForm );

Then in your AppHandleEvent() function that should be in Starter.c, just set the form event handler to the handler you want to use for that form. Something more or less like this:

static Boolean AppHandleEvent(EventPtr eventP) {
UInt16 formId;
FormPtr frmP;

if (eventP->eType == frmLoadEvent) {
// Load the form resource.
formId = eventP->data.frmLoad.formID;
frmP = FrmInitForm(formId);
FrmSetActiveForm(frmP);

// Set the event handler for the form. The handler of the currently active form is called by FrmHandleEvent each time is receives an event.

switch (formId) {
case YourNewForm:
FrmSetEventHandler(frmP, YourHandler());
break;

default:
ErrFatalDisplay("Invalid Form Load Event");
break;
}
return true;
}

return false;
}


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/f
_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to