Check the API and some sample code. Maybe this is just a different way to write Palm apps that I don't know about but you seem to be way off. For one thing, it seems unlikely that you would call FrmInitForm() and FrmGotoForm() in the same function. Why are you calling all of the other stuff before FrmGotoForm()?
matt
Hy!!! A want to put the selected text from the LIST of the current form on a new form before deleting the old one. The problem is that when i draw the new form, the LABEL is set with the value that i want, but none of the controls responds to my command. I tried to use a FrmGotoForm after setting the LABEL text, but this function redraw the form and erase all the changes. Does anybody can explain-me what is going wrong whith the code?Thanks! static Boolean frmRCAS_cmdAvancar_OnSelect(EventPtr event) { // Insert code for cmdAvancar //Define points and variables to the controls FormType *formnew; FormType *formold; UInt16 nomeIndex; FieldType *nome; ListPtr lptr; //Load the New Form into Memory FrmInitForm(frmRCAInfo); //Set points to the new and old form formold = FrmGetActiveForm(); formnew = FrmGetFormPtr(frmRCAInfo); nomeIndex = FrmGetObjectIndex(formnew, lblNome); //Set a point to the list on the oldform lptr = (ListPtr)FrmGetObjectPtr(formold, FrmGetObjectIndex(formold, lstRCAS)); //Set the LABEL of the newform with the selected item of the list in the oldform FrmHideObject(formnew, nomeIndex); FrmCopyLabel(formnew, lblNome, LstGetSelectionText (lptr,LstGetSelection(lptr))); FrmShowObject(formnew, nomeIndex); //Paint the new form FrmDrawForm(formnew); FrmSetActiveForm(formnew); //NO CONTROL WORKS. IF I PUT THE FOLLOWING LINE, THE CONTROLS WORKS BUT MY CHANGES ARE LOST... FrmGotoForm(frmRCAInfo); return true; }
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
