Set Variable or CustomProperty Names with and expression
bonnmike at gmail.com
Wed Aug 12 22:16:31 CEST 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
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
>> 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!
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode