At 12:34 AM 8/25/2004, you wrote:
Hi all,

I got a form with some dynamically created objects.
When I use FrmGetObjectIndex in TT (and os5 simurator), when there are no
such object ID (the object doesn't exist), it will return frmInvalidObjectId
(equal = -1).

But when I do the same things in Clie N610 (which is os4), it will return
65535.

Finally, if I ran the program in Palm V (os3.2), it will return an fatal
error said the object doesn't exist.


I want to use FrmGetObjectIndex to see if the object exist, is there any way to do it in all different version of palmos?

You can use the APIs to:

1) Find out how many objects are on the form
2) Iterate through all objects by index
3) Check to see if the object is of a type that would have an ID
4) Convert an index to an ID for appropriate types

Put this all together into a useful utility function.


-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_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