Accessing custom props using array notation
Devin Asay
devin_asay at byu.edu
Thu Aug 19 12:38:42 EDT 2010
On Aug 19, 2010, at 10:25 AM, Kevin Miller wrote:
> On 19/08/2010 17:16, "Devin Asay" <devin_asay at byu.edu> wrote:
>
>> True enough, but can you do the opposite?
>>
>> put "state" & 1 into tPropName
>> put the tPropName of image "myImg" into foo
>>
>> Unless memory fails, you can't do that--I've tried it; i.e., you can't
>> dynamically build property names to access existing custom props.
>>
>> I would be love to be proven wrong. ;-)
>
> Well it should work and it does here.
Well, shut my mouth! That'll teach me to rely on faulty memory! (I blame space aliens and nano-brain-implants.) This works perfectly:
put "state" & tNum into tMyProp
set the text of img "myImg" of me to the tmyProp of img "myImg"
Jacque, could I get a copy of your time warp stack so I can not write my original post yesterday?
Thanks, Kevin!
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list