Refer object with the value of a variable

Peter Brigham MD pmbrig at gmail.com
Mon Dec 20 09:06:31 EST 2010


Whoops -- another problem, maybe the chief problem: it's the  
customproperty[cSet], not the customproperties[cSet], see below

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


On Dec 20, 2010, at 8:29 AM, Peter Brigham MD wrote:

> On Dec 20, 2010, at 6:46 AM, Josep M Yepes wrote:
>
>> Hi,
>>
>> Why this code don't run?
>>
>> I want to assign the value of tX[tKey] to the fields that have the  
>> same name of the value.
>>
>> pLanguage is passed by the user.
>>
>>
>> put "u" & pLanguage into tX
>>
>>  repeat for each key tKey in the customproperties["u" & pLanguage]  
>> of this stack
>>     set the text of fld tKey to tX[tKey]
>>  end repeat
>
> I think you have to put the customprop into a variable first:
>
>  put "u" & pLanguage into cSet

    put the customproperty[cSet] of this stack into tPropArray

>  put the keys of tPropArray into keysList
>  repeat for each item tKey in keysList
>     set the text of fld tKey to tX[tKey]
>  end repeat
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
>





More information about the Use-livecode mailing list