Let's say your the last UID of a control in your form is 9999 (unlikely).
Even now you could use UIDs up to 32768 (or something like that). For each
new dynamicaly created control increase the number, e.g.:
first control: 10000
second control: 10001
third control: 10002
AFAIK you can have the same ID in two (or more) different forms, but not in
the same.
"Hans-Christoph Wirth" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:93696@palm-dev-forum...
>
> I am using PalmOS 3.5.
>
> There's a bunch of routines to create UI objects at runtime, e.g.
> FldNewField() and CtlNewControl(). All routines require to specify
> the ID of the new object. As I understand, this ID should be unique
> throughout the application (at least throughout the current form).
>
> How do I create an ID which is unique?
>
> Of course I can use #define and manually select IDs. I would consider
> this as "hardcoded" as it might interfere with any automatic creation
> of IDs, e.g. when using PilRC to create static UI objects. Is there
> a safer way?
>
> hcw
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/