using a variable for the name of a custom property - safe?

Sarah Reichelt sarah.reichelt at gmail.com
Thu Nov 8 18:33:25 EST 2007


> My question, though, to save me a lot of lines of code, is:
>
> Does anyone do this routinely? (Refer to a custom property with a
> variable name) Is this unsafe? Or something that might change in 2.9
> or 3?

I do this with my own custom property set. So for data storage I have
a set called cDataStorage and it has elements called pH1, pH2, temp1,
temp2 etc.

I can get data directly e.g.
    put the cDataStorage["temp1"] into tData

or using a variable:
    put "pH1" into tActiveSensor
    put cDataStorage[tActiveSensor] into tData

I have had no problems with this approach.

Sarah



More information about the use-livecode mailing list