[Tip] Propeties & sets & List of 'reserved words' and gotchas

Stephen Barncard stephenREVOLUTION at barncard.com
Mon Feb 20 16:02:33 EST 2006


I've been working a lot with Custom Properties lately and have come 
across an undocumented system condition that's taken a while for me 
to find out about....so I'll pass it along.

I say 'condition' because I think this is normal behavior for the 
custom property system. But it's a GOTCHA for sure.

The rule is:

One can't name a custom property with the same name as any regular 
property of an object.

One should not probably name any object with any system reserved 
words, even if it might work sometimes....

when you try to name a property like this:

set the AnyPropName[name] of this stack to "anytext"

it won't work  or will provide unpredictable results. When one tries 
to read it, one just gets the name of the stack, and sometimes stacks 
get renamed, etc... Bad stuff happens..

So this might happen if one has a user naming properties directly.

If one has custom property naming directly open to users, one should 
run a check on the entry compared against the properties() of that 
object.

-- 
stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -



More information about the use-livecode mailing list