At 05:40 PM 5/19/2004, you wrote:
Is it possible to access several objects on a form by loading their pointers
and/or indexes into arrays? For example:

for (i=0; i<10, ++i); {
    SetFieldText(ptrArray[i], newText, 1);
    FrmShowObject(frmP,  indexArray[i]);
}


If so, any code examples I can cheat from? I searched the archive and knowledge base. Are there any gotchas, like for instance a pointer may change after a form is closed and reopened?

Pointers WILL change when a form is closed and reopened, since you're now dealing with a new instance of a form. Pointers to form objects WILL also change if you do add or remove any dynamic controls in a form.


However, while a form is initialized, barring any changes, form object pointers are stable. The whole form object support in POL (Object Library for Palm OS) uses this fact.


-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



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

Reply via email to