Problem with field references

Mikey mikeythek at gmail.com
Thu Jul 3 16:04:40 EDT 2008


This is a little weird.

I have two stacks.  we'll call them mainstack and substack.

In substack I want to build a fieldname from user input and check to see if
it exists on mainstack.

The result of this is a variable fieldname that contains
"Dept 14" of card "Dept Personnel" of stack "mainstack"

if I execute "if there is a field fieldname then"
However, RR doesn't recognize the existence of field fieldname.

Next try, put "field" on the front, so we have
field "Dept 14" of card "Dept Personnel" of stack "mainstack"

and execute "if there is a fieldname"
which returns true.  Great!  Uh, maybe not.  Now I have to extract the
contents of this field
obviously put field fieldname into somevariable doesn't work. since
fieldname evaluates to "field...", resulting in put field field...

So instead I tried deleting the first word of fieldname, but RR can't find
the field again.

So what newfangled way of doing remote field references should I be using
instead of the old-timers HC way?
-- 
Rita Rudner  - "When I eventually met Mr. Right I had no idea that his first
name was Always."



More information about the use-livecode mailing list