Before handlers

Richard Gaskin ambassador at fourthworld.com
Tue Jan 7 09:36:58 EST 2014


Dr. Hawkins wrote:
> On Mon, Jan 6, 2014 at 9:26 AM, Paul Hibbert <paulhibbert at mac.com> wrote:
>
>> 2. The engine next looks at the object script - If an on mouseDown handler
>> is present, then it executes it
>>         else, the engine looks at the behavior script - If an on mouseDown
>> handler is present, it executes it.
>>
>
> Yes, that's what I meant.
>
> I had actually been under the impression, until this thread, that the
> object's own script was ignored when there was a behavior script.

That's one of the great things about LC's behaviors:  we can overload 
behaviors with a handler in the control that passes the message, or 
override it by handling it without passing, allowing us to use behaviors 
where we want and still have unique functionality for a given object if 
needed.

And now that behaviors can be chained in v6.1 and later, we can do this 
anywhere along the path, effectively subclassing behaviors with other 
behaviors.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list