What's wrong with Globals?

Richard Gaskin ambassador at fourthworld.com
Fri Mar 30 20:04:31 EDT 2007


Jim Ault wrote:
> Basically, globals are all owned by Rev, which means you can close a stack
> and remove it from memory, but not the globals.  You need to delete the
> global or quit and relaunch Rev.
> 
> Globals can be modified by any handler in any stack, even the Rev
> environment (all that stuff behind the scenes).
> 
> Globals are not saved with the stack, custom properies can be, but this may
> not be an issue in most cases.

Those also sound like benefits to me.  :)

Of course it depends on the context.

I tend to use persistent storage (custom properties) when I need 
persistence, and non-persistent storage (globals) whenever I don't.

Both are very useful.

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list