On 17 Apr 2010, at 00:39, Vokey, John wrote:
set the fred of this stack to myArray
put fred into mary; set the mary of this stack to myArray
do the same thing. The line
set the fred of this stack to myArray
should throw an error if fred is empty. Unfortunately, nobody at RunRev
Vokey, John wrote:
However, to be consistent,
the name of the custom property should be a quoted literal when not
the contents of a variable name
You would be right if quoting literals was mandatory. It is not,
although AFAIAC quoting is strongly recommended.
Robert
Hello everyone,
I vaguely, very vaguely, recall that a custom property should have a name that
is different from the variable to which it is being set. So, for example, if
myArray is the variable, then
set the myPropArray of this stack to myArray
is fine, but
set the myArray
I have no issue with this. I remember a while back that single char
properties or variables caused a problem. I tested this in a button:
on mouseenter
put random(99) into xxx
set the xxx of me to xxx
put the xxx of me
end mouseenter
gives a bunch of random number whenever you enter
In naming custom props and vars, I try to avoid anything that might 'look'
like any function or command name, not starting with a number, and using
underscore or dash instead of spaces.
However array key names ( myArray[text] ) seem to be able to work against
some of these rules (as long as
I always use gGlobalVar, vLocalVar, and cpCustomProp just so I know what's
what. With these prefixes I never seem to have any conflict.
Mark
On Apr 16, 2010, at 2:19 PM, stephen barncard wrote:
In naming custom props and vars, I try to avoid anything that might 'look'
like any function or
On Apr 16, 2010, at 2:36 PM, Mark Swindell wrote:
I always use gGlobalVar, vLocalVar, and cpCustomProp just so I know
what's what. With these prefixes I never seem to have any conflict.
Mark
I agree with Mark about prefixes to avoid reserved word conflicts +
debugging at a later date
If you note in the Dictionary there is a comment from me on this ``hiccup'' of
the custom properties, and it represents a long-standing complaint of mine
(i.e., that all custom property names should be quoted literals or the contents
of some variable). The problem is this:
if variable fred
On Apr 16, 2010, at 2:06 PM, dunb...@aol.com wrote:
I have no issue with this. I remember a while back that single char
properties or variables caused a problem. I tested this in a button:
on mouseenter
put random(99) into xxx
set the xxx of me to xxx
put the xxx of me
end mouseenter
Thanks for all of the responses! It appears that few of you experience the
same problem as me, although everyone has naming conventions that avoid
possible name conflicts. One observation, though, with respect to Craig
Newman's example. When I call on the custom prop from within the same
Vokey, John wrote:
However, to be consistent,
the name of the custom property should be a quoted literal when not
the contents of a variable name
Sorry, I disagree with you too. :P
Properties, custom or otherwise, aren't quoted. Only literal text
strings are quoted. We don't do this:
put
11 matches
Mail list logo