Mark wrote:

>....When working in Lingo, you
>have two places where properties can be stored: a behaviour and a
>childObject (an instance of a parent script).

Properties can also be accessed directly in script objects, that is, 
in the uninstantiated class.

>...One might
>argue that a behaviour and an object differ, but IMHO,  a behaviour is
>simply a specialized object type that MACR has created with specialized
>constructors and destructors that are called when the sprite (or frame - a
>frame script is simply a behaviour attached to sprite(0))comes into
>existence and when the sprite goes out of existance on the score.  An object
>on the other hand is created by the programmer and is explicitly
>instantiated by the programmer using the on new  handler

I don't think, that behaviors and objects are different beasts. They 
are both instantiated scripts. The only difference is in how they are 
usually created. "child-objects" are explicitly created by Lingo, and 
behaviors are mostly created by Director behind the scenes, and their 
references stored in the scriptInstanceList of sprite objects. But 
you can just as well instantiate an object and stuff it in a 
scriptInstanceList yourself. If you do so these "manually created" 
objects will receive all the usual events, that behaviors receive, 
such as 'beginSprite' and so forth. Simply because any object stored 
in a scriptInstanceList _is_ a behavior. As a curiosum(?) it's also 
possible to store other kinds of "objects", such as scripts and 
members in a scriptInstanceList, but that is probably just futile.

Cheers, Jakob.


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to