Forcing a variable to evaluate as an object reference

David Glasgow david at dvglasgow.wanadoo.co.uk
Tue Sep 12 15:41:59 EDT 2006


OK,

Now it is just tantalising.

The following:

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
     do "put" && quote & it & quote && "into field" && i
   end repeat
end yeschangeit


works for two of the three fields listed in langfields:  (thanks Jeanne 
for the magic 'do')

"Inst3" of card "Ranking" of this Stack
"Inst2" of card "Ranking" of this Stack
"Inst1" of card "Ranking" of this Stack

It always fails on "Inst2" which exists and has the properties 
required.  It fails wherever it appears in the field "langfield" (i.e. 
I shuffled the order just to see if it was the last item that always 
failed)

put field "Inst2" of card "Ranking" of this Stack

in the message box results in the contents appearing as expected.

The error is:

      	executing at 8:03:49 PM
Type	do: error in source expression
Object	Assessment Language
Line	do "put" && quote & it & quote && "into field" && i
Hint	group id 2551 of card id 1002 of stack "/Applications/Revolution 
Studio/2.7.2-gm-1/Affinity 2.0.rev"

Any suggestions?


Best Wishes,

David Glasgow
Carlton Glasgow Partnership

http://www.i-psych.co.uk




More information about the Use-livecode mailing list