I'm getting the 'object not in form' error when trying to load some fields
on a form in my startup function.

I'm using the model introduced in the Tutorial of having a separate .c file
for each form, each with similar methods like FooFormHandleEvent and
FooFormDoButtonCommand. I added a LoadFields( FormType *frmP) method to this
.c file and was calling it from within the frmOpenEvent for this form, and
it works fine that way.

The problem is that this LoadFields() method does a fair amount of work so
there's a slight delay when it loads, and LoadFields() doesn't need to be
called everytime the form is loaded (it's really more like initializing the
values, which are occasionally updated later on).  So I'm trying to call the
LoadFields function from within the AppStart() method by doing

frmP =  FrmInitForm( FooForm );
LoadFields( frmP );

Within LoadFields(), the 'object not in form' is being thrown when I try to
execute

setLabelText( frmP, FooR1c1Label, "???" );

Any ideas?



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

Reply via email to