[UI] ToolBuilder

Jason Johnson jason.johnson.081 at gmail.com
Thu Sep 13 04:57:05 UTC 2007


On 9/12/07, Igor Stasenko <siguctua at gmail.com> wrote:
>
> >   World allPossibleEvents do: [:event|
> >     (self decoratedEvents includes: event)
> >       ifTrue: [ World on: event send: event to: self ]
> >       ifFalse: [ World on: event send: event to: decoratee ] ]
>
> An event handling with decorations can be done simply through forwarding
> like:
>
> handlesEvent: anEvent
> ^ (self handleMyself: anEvent) or: [ decoration handlesEvent: anEvent ].
>
> or, if we prefer to handle event by decoration morph , then change order.

Well, my idea was not to forward at all in any case, just decide the
handler of the message at registration time so that the decorator
never gets messages he doesn't override.


More information about the UI mailing list