can't put into field by id?

Richard Gaskin ambassador at fourthworld.com
Thu Nov 13 18:59:09 EST 2014


Dr. Hawkins wrote:
> With a sequence like,
>
> put the long id of fld (word 1 of myVar) into theFld
> put "gizmo" into theFld
>
> I end up with "gizmo" in the variable theFld, rather than the field it
> references.
>
> Am I doing something wrong, or does this just not work for fields (7.0-RC2)

I believe that's consistent with all versions.

You could rewrite the code so that the variable portion contains only 
the short name, e.g.:

    put "gizmo" into field theFld

...but that's not much fun.  It may be simpler to use the 
property-setting form, in which case the engine will do its best to try 
to evaluate the value of the variable as an object reference, e.g.:

   set the text of theFld to "gizmo"

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list