changing stack ID

Richard Gaskin ambassador at fourthworld.com
Thu Feb 25 18:29:30 EST 2010


DunbarX wrote:
> What is the rationale for changing the stack id whenever a new object is
> created in it? I get, and am grateful for, the altID, but what purpose was
> this behavior intended to serve?

IIRC, the stack ID is merely the placeholder for the next available ID 
for any object to be created in the stack.  It gets incremented as you 
make more stuff.

> I got very used to rock solid ID's with you know what. Is there a benefit?

The stack ID serves no useful purpose that I can think of, other than 
internally for the engine to ensure unique IDs.

For a unique identifier use the stack name.  Stacks in memory much be 
uniquely named anyway, and their names have far greater mnemonic value.

Note that the stack's title is separate from the name, so if you like 
you can use the name for short strings that are easier to type in your 
code, while having fully descriptive titles that can even change at 
runtime if needed without altering your stack's name.

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the use-livecode mailing list