At 11:11 AM -0700 9/18/06, Phil M wrote:
Just to verify... if I add a item with a value of -1 at the *end* of the list, the other values will not change?

Also, is REALbasic smart enough to only link one value per constant?
(i.e. not starting over again at 0 after an item with a value of -1)

If you're going to use the value of an enum in a persistent way, ie store it for later use, then it seems prudent to explicitly define the values yourself. Otherwise it seems far too easy for an undetected 'accident' to occur where a future enum edit or slight change in RB's 'enum value allocator' could give your enums different internal values.

I'd recommend using the default allocator only if you strictly use the enums by name and never know nor care what their internal values actually are. Obviously if you're storing the values externally somewhere, you need the values to be consistent from run to run and therefore I'd recommend specifying them all explicitly.

Regards,
Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to