Accessing imbedded custom properties (or other variables...

Dr.John R.Vokey vokey at uleth.ca
Wed Oct 13 12:45:38 EDT 2004


Not necessary to use ``do''.  A simple: set the myPropName of this 
stack to <whatever> will work, as long as myPropName has a value, 
otherwise the custom property set will be the literal ``myPropName''.   
As I have written previously, the former use is proper 
syntax---consistent with transcript's use of variables generally, but 
the latter is not.  If the literal is intended, it should be quoted 
(but that doesn't work currently; i.e., set the "foo" of this stack to 
<whatever> fails).

>
>> However, the name of the custom property I want to set is in the
>> variable myPropName.
>>
>> So how do I make the spontaneous contents of the variable myPropName
>> into the name of a property, the contents of which I want to get or
>> set?
>
> Use the "do" command, like:
>
>   do "set the" && myPropName && "of this stack to" && \
>     quote & "1234" & quote
>
--
John R. Vokey, PhD
Professor
B.E.R.G. - Behaviour and Evolution Research Group
Micro-Cognition Laboratory
Department of Psychology & Neuroscience
University of Lethbridge
Lethbridge, Alberta T1K 3M4
CANADA



More information about the use-livecode mailing list