Number for id

what number is safe to be used for Id?
you see, most of time I use -1 for id which means id is generated
automatically
also there is some fixed id like id for about dialog, or else
but sometimes we need the id number, like when we create shortcut for
menu
item

So, what range of number is safe? I see the docs and some of them use
number

100
is that ok?
what number is forbidden?

Regards
Hendra

On 22/03/2010 01:52, hendra kusuma wrote:

what number is safe to be used for Id?
you see, most of time I use -1 for id which means id is generated
automatically
also there is some fixed id like id for about dialog, or else
but sometimes we need the id number, like when we create shortcut for
menu item

Any value < 65336 is permitted, in theory. Use Wx::ID_ANY / -1 wherever
possible, but otherwise I think values > 3,000 are almost all open for
user use. Some classes (eg Wx::Event) also have methods to give
unreserved ids.

alex

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs