What's the best way to do objects?
Colin Holgate
coiin at verizon.net
Tue Mar 1 10:11:18 EST 2011
On Mar 1, 2011, at 9:27 AM, Thomas McGrath III wrote:
> behaviors + groups = widgets
That is a bit different to objects. An object might look more like this:
var myobj:MyObj = new MyObj();
myobj.doSomethingSpecial();
You could I suppose have a new thing on the card that you set the script of, and then send messages to that object. Like:
on mouseUp
new Button
set the name of button the number of buttons to "myobj"
set the script of button myobj to field "my script"
send dosomethingspecial to button myobj
end mouseUp
and field "my script" would contain:
on dosomethingspecial
put "hello world"
end dosomethingspecial
More information about the use-livecode
mailing list