Stack and Substacks and user properties

Richard Gaskin ambassador at fourthworld.com
Sun Jun 1 15:56:01 EDT 2003


Rob Cozens wrote:

>> by binding arbitrary data to specific objects you get the benefits of global
>> vars but without the name space issues
> 
> I'm not getting the point here, Richard.
> 
> Don't custom properties have names?
> 
> Can't the name of a custom property be as long the name of a global variable?

Absolutely.  But building on the example I gave about binding the data file
name to the window the data is displayed in, you can use the same property
name in each window to access data unique to that window, but as a global
you'd either need different names,or a global array with different keys.

In many cases globals and properties could indeed be interchangeable, esp.
with Transcript's arrays.  And of course from time to time there are good
reasons to use a global when nothing else will do.

But the persistence of properties, theirinherent binding to objects, and the
fabulous getProp and setProp constructs open as natural accessors up whole
new worlds for mare easily maintainable solutions.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list