Set Variable or CustomProperty Names with and expression

Mike Bonner bonnmike at gmail.com
Wed Aug 12 16:16:31 EDT 2015


You can use a custompropertyset using array notation too.

set the myproperty["uName"] of button 1 to "Fred is dead"
set the myproperty["uBirthday"] of button 1 to "Hatched not born"

Then you can: put the myproperty["uName"] of button 1 and it'll say "fred
is dead"

In this way you don't have to schlep the whole array in and out all the
time, while still having the advantages of using array notation.


On Wed, Aug 12, 2015 at 2:08 PM, Brahmanathaswami <brahma at hindu.org> wrote:

> Peter Haworth wrote:
>
>> Instead of setting individual cprops, you could store the whole array as a
>> cprop - "set the uQuoteSets of this stack to aQuoteSets".  When you want
>> to
>> use them, "put the uQuoteSets of this stack into aQuoteSets"
>>
>
> "duh"  of course... "if you make and array, just use it"
>
> i will change that right now
>
>
>> By the way, I entered a QCC report about the ability to use expressions as
>> custom property names a few months back. Mark Waddingham commented that it
>> should be fairly easy to implement but it hasn't happened yet.
>>
>
> Jacqueline says at least we can use a variable to name a cProp
>
> the IDE is already pass a value  like this
>
> command revInspectorSetProperty pObject, pPropName, pValue
>    lock messages
>    set the pPropName of pObject to pValue
>    unlock messages
> end revInspectorSetProperty
>
> But, I like your method.. just store the array!
>
> BR
>
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list