From: "Patrick Ouellet" <[EMAIL PROTECTED]>
Subject: List Object HowTo


> I need help ....
> Im trying to full a List at run-time but I got an error
> Object not in form and since the object ios in the form, im wondering
> whats the problem
>
> LstSetListChoices(FrmGetObjectPtr(frmP, FrmGetObjectIndex( frmP,
> Screen2ResultList)), TheResult, ResultCount);

This may not be the problem, but it is a common source of "Object not in
form" errors...

How are you obtaining frmP?  If you use
    frmP = FrmGetActiveForm();
then frmP may point to a different form than you are expecting.

If you want to make sure that frmP points to the right form (MainForm, for
example), get that pointer explicitly with:
    frmP = FrmGetFormPtr( MainForm );
This will get a pointer to the form with id=MainForm, instead of whatever
just happens to be the current form.



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

Reply via email to