Storing an Array as a Custom Property

Claudi Cornaz claudi.c at fiberworld.nl
Sat Oct 2 10:22:35 EDT 2010


There is another one theat works
put "richard" into tProp

put the gasking[tprop] of tObj

Apparantly the set name by itself can't be a var, altough the prop  
name can.
So either put the whole thing in a var (set name en property name) or  
you can only use the property part as a var.

    Claudi


On 2 okt 2010, at 15:18, Richard Gaskin wrote:

> Claudi Cornaz wrote:
>
>> It works if you create it as one var so put "gaskin[richard]" into
>> tPropSet
>> set the tPropset of tObj to tValue
>>
>> Or you can do
>>
>> on mouseUp
>>      put "gaskin" into tPropset
>>      put "[richard]" after tPropSet
>>      set the tPropSet of tObj to tValue
>> end mouseUp
>>
>> I use this the whole time
>
> Nice!
>
> It hadn't occurred to me to put the entire array notation string  
> into a variable.  And it avoids the performance penalty of "do" --  
> good stuff.  Thanks!
>
> --
> Richard Gaskin
> Fourth World
> LiveCode training and consulting: http://www.fourthworld.com
> Webzine for LiveCode developers: http://www.LiveCodeJournal.com
> LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list