Well, *where* does this object come from? There are only two ways in which an 
object could have appeared on your form - either you put it there with the 
Resource Editor when you were designing the form, or you have created it 
dynamically with FrmNewBitmap(), FrmNewGadget(), FrmNewLabel(), 
CtlNewControl(), FldNewField(), or LstNewList(). In both cases you must know 
its objectID.

If you used the Resource Editor that comes with PODS to create the object on 
the form, the objectID appears in the .h file generated by the Resource Editor 
and looks something like this - kFormnameFormObjectnameObjecttype. For 
instance, if the form is named Foo and the object is a field named Bar, the 
objectID would be kFooFormBarField.

If, OTOH, you have created the object dynamically, then you must have supplied 
its objectID to the function with which it was created - so, again, you must 
know it.

That's why there is no function that returns it directly - because you're 
assumed to know it already.

If you know the objectID, you can obtain from that the object index by using 
FrmGetObjectIndex(). This is needed, because you need an object index (instead 
of an objectID) for several functions - e.g., for FrmGetObjectPtr().

You can obtain the objectID from the object index, if you happen to have 
forgotten the former but know the latter, by using the function 
FrmGetObjectId().

What exactly is the task that you want to perform and why don't you know the 
objectID of the object?

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

Reply via email to