re: Bogus Invalid Index error
Hi! In my current project I'm using almost the same code without any problems. >>form.c, line 2172, invalid index Sounds as if FrmGetObjectIndex were returning -1 (frmInvalidObjectId) >>FrmSetGadgetHandler(frmP,FrmGetObjectIndex(frmP,ToolbarGadget) >>(void*)toolbarGadgetHandler); >>Anyone have any ideas? Un-nest the function calls, then check: 1. is FrmGetObjectIndex returning sth. reasonable? 2. is frmP valid (use FrmValidatePtr) ? 3. if frmP is valid, does it refer to right form? If all this does not help. What device/simulator do you experience the crash on? Harry -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
RE: Bogus Invalid Index error
When is this call done? Don't know about more recent versions of PalmOS, but I recall that with PalmOS 4.x FrmGetObjectIndex doesn't return a valid index until the form is done loading. This is from memory; it was a while ago. I recall that some form functions could be called before the form was loaded, but for those that required an index, I needed to wait until afterwards. HTH, Remi. -Original Message- From: Tam Hanna [mailto:[EMAIL PROTECTED] Sent: June 9, 2008 9:51 AM To: Palm Developer Forum Subject: Bogus Invalid Index error Hello Folks, currently testing a Palm Os app, and made the unfunny discovery that assigning an extended gadget a handler dies with the message form.c, line 2172, invalid index The code line that's affected is this: FrmSetGadgetHandler(frmP,FrmGetObjectIndex(frmP,ToolbarGadget),(void*)toolba rGadgetHandler); I have already checked the control ID and the pointer, and they all are valid. Nevertheless, the app dies whenever the call runs.. Anyone have any ideas? Best regards Tam Hanna -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/ -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Bogus Invalid Index error
ithey may be valid but check that frmP really points to form where is ToolbarGadget. maybe you used this frmP temporarily somewhere else and check if there is no typo in name of gadget i use extended gadgets a lot and i never noticed any problem which wouldn't be my bug at the end Tam Hanna wrote: Hello Folks, currently testing a Palm Os app, and made the unfunny discovery that assigning an extended gadget a handler dies with the message form.c, line 2172, invalid index The code line that's affected is this: FrmSetGadgetHandler(frmP,FrmGetObjectIndex(frmP,ToolbarGadget),(void*)toolba rGadgetHandler); I have already checked the control ID and the pointer, and they all are valid. Nevertheless, the app dies whenever the call runs.. Anyone have any ideas? Best regards Tam Hanna -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Bogus Invalid Index error
Hello Folks, currently testing a Palm Os app, and made the unfunny discovery that assigning an extended gadget a handler dies with the message form.c, line 2172, invalid index The code line that's affected is this: FrmSetGadgetHandler(frmP,FrmGetObjectIndex(frmP,ToolbarGadget),(void*)toolba rGadgetHandler); I have already checked the control ID and the pointer, and they all are valid. Nevertheless, the app dies whenever the call runs.. Anyone have any ideas? Best regards Tam Hanna -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/