Forcing a variable to evaluate as an object reference
m.schonewille at economy-x-talk.com
Mon Sep 11 14:19:38 EDT 2006
Does this work for you?
put "changing it now"
repeat for each line i in field "langfields"
-- put "field " & i into twhere
get the Language[glanguage] of fld i
put it into field i
Consultancy and Software Engineering
Get your store on-line within minutes with Salery Web Store software.
Download at http://www.salery.biz
Op 11-sep-2006, om 17:39 heeft David Glasgow het volgende geschreven:
> I have the strange feeling I really should know the answer to this,
> but my mind is blank.
> I have written a routine for switching languages of the text
> contained in a number of fields (listed in field "langfields"). The
> fields are on various cards, and are listed in "langfields" in the
> "Inst3" of card "Ranking" of this Stack
> The different language texts are stored in a custom property set
> 'Language' in each of the respective objects.
> When the script runs, the text is retrieved from the custom
> property set glanguage, but the "put it into field i" generates a
> 'no such object' error. I have tried different forms of syntax,
> brackets and whatnot, but either get the no object error, or the
> text is put into the variable 'i' rather than into the relevant
> 'field i'. I originally tried doing the get and put into the
> field in one line, but broke it in to steps to see where it was
> on yeschangeit
> global glanguage
> put "changing it now"
> repeat for each line i in field "langfields"
> put "field " & i into twhere
> get the Language[glanguage] of twhere
> put it into field i
> end repeat
> end yeschangeit
> Best Wishes,
> David Glasgow
> Carlton Glasgow Partnership
More information about the Use-livecode