Post
by dunbarx » Sun Mar 23, 2014 4:06 pm
Atout66.
There are two things going on here. Some entities in LC are called "containers". These are fields, variables, the message box and buttons. They "contain" data, and you manage them by;
put yourData into field 3 (or perhaps: get field 3)
put yourData into button "yourButton" (or perhaps: answer button "yourButton)
put yourData into yourVariable (or perhaps: put yourVariable into the message box)
But other entities are "properties", like:
the text of field "yourField"
the height of field "yourField"
the loc of fld "yourField"
You may "set" or "get" those values, but you cannot "put" anything into them. For example, the script of an object is a property of that object. You can change that script, but you have to "set" the property. So if you had this in a variable "newScript":
on mouseUp
beep 3
end mouseUp
You could: set the script of button "yourButton" to newScript, but you cannot: put newScript into the script of button "yourButton".
Takes a little getting used to, but you will soon become an expert,
Craig Newman