You are better off using a field and setting it to read only, its safer. Altering labels at run time can be tricky. I may be able to dig up some code but I'd try first changing it to a field and use the field text update routines.
----- Original Message ----- From: "Michael Jones" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Monday, November 10, 2003 3:03 PM Subject: Dynamically updating a label on a form - problem > I'm trying to dynamically update a label on a form. > > Here's the code snippet occuring during the nilEvent of the > HandleEvent method for this form: > > // then change the label text > index = FrmGetObjectIndex(form, lblSessionTime); > FrmHideObject(form, index); > FrmCopyLabel(form, index, sessionTimeText); > FrmShowObject(form, index); > > I get the following error message in the Palm Emulator when > debugging: > > New Application (unknown version) called SysFatalAlert with the > message: "Form.c, Line: 1272, Object not in form." > > When stepping through the debugger, this error is triggered by the > FrmCopyLabel line above. I can not understand for the life of me > why the FrmHideObject which uses the same object index is fine but > the next line fails. If I comment out the FrmCopyLabel line, all is > well - except my label remains unchanged. > > Any pointers? > > Thanks! > > Mike > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
