Forcing a variable to evaluate as an object reference
JimAultWins at yahoo.com
Tue Sep 12 16:54:10 CDT 2006
try this variation
I always do the following progression
put ("put" && quote & it & quote && "into field" && i) into cmd
Now set a breakpoint and use variable watcher to see what cmd holds.
If all looks good, then copy the cmd string in variable watcher and paste
into a word processor that can display high ascii. Look for a trailing
space or tab or null that will make the name you are using different from
the named field. Now do the reverse and see if the field name has a
If that all looks correct, then set a breakpoint before the 'do cmd' and see
if there is a variable 'inst2' already defined. This may cause a conflict
with the field naming, but should not with the quotes around the name.
Let us know.
On 9/12/06 12:41 PM, "David Glasgow" <david at dvglasgow.wanadoo.co.uk> wrote:
> 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
> 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
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the use-livecode