Refer object with the value of a variable

Peter Brigham MD pmbrig at gmail.com
Mon Dec 20 08:29:07 EST 2010


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 customproperties[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