Dereferencing control ids

Peter Haworth pete at lcsql.com
Mon Jan 27 15:47:35 EST 2014


Getting a problem trying to grab the topLeft of each control in the
selectedObjects.  Code is as follows:

repeat for each line rLine in the selectedObjects
   put the topLeft of rLine & return after sLocations
end repeat

I get a runtime error on the "put" statement:

(Chunk: error in object expression) near "field id 1004 of card id 1002 of
stack "test"", char 23.

The field reference is what's in rLine.

I've also tried using a do statement resulting in a slightly different
error - "error in source expression"

If I enter - put the topleft of field id 1004 of card id 1002 of stack
"test" - into the message box, I get a valid result.

I have a horrible feeling this is going to be something really obvious but
nevertheless, what am I doing wrong?

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>



More information about the use-livecode mailing list