a) make sure you call your form init routine after FrmDrawForm
b) make sure you are not confusing the object index and the object ID.  The
are completely different.  Exchanging one for the other sometimes causes the
object not in form error.

----- Original Message -----
From: "Brian & Andrea Preston" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, January 25, 2003 8:09 PM
Subject: object not in form after FrmInitForm


> 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/
>



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

Reply via email to