[Tip] Propeties & sets & List of 'reserved words' and gotchas
Stephen Barncard
stephenREVOLUTION at barncard.com
Mon Feb 20 17:15:51 EST 2006
Trevor -
I've seen references that the brackets are enough to serve as quotes
- it works either way for me. That's not the problem.
Quotes or no quotes - I've found one can't save a custom property
with a name of an existing regular PROPERTY in the same object
without problems -- unless of course the quotes appear in the name...
custom props with names like name, title, tabstops, html ,etc. will
cause trouble in various ways -
Try it - won't work in the properties inspector or from script. It
will seem to have been entered, but reading back the prop name will
display the regular property rather than your custom one...or just
nothing.
Not knowing this has caused hours of weirdness, because there is no
error reporting on custom prop activity.
Reserved words aren't part of the properties system, but I've become
suspicious of using them. Another reason to use standard naming
conventions I guess.
sqb
>
>Stephen,
>
>You can reliably use reserved words with array notation as long as
>you have quotes around the key (I've never tried without quotes
>actually).
>
>I use code like this all of the time:
>
>set the uAutoEvents["MouseUp"] of myObject to "DoSomething"
>
>Perhaps it is the lack of quotes that is causing problems?
>
>--
>Trevor DeVore
>Blue Mango Multimedia
>trevor at mangomultimedia.com
>
--
stephen barncard
s a n f r a n c i s c o
- - - - - - - - - - - -
More information about the use-livecode
mailing list