Proposal for Morphicperformance-measurement

Andreas Raab andreas.raab at gmx.de
Wed Jul 30 17:49:56 UTC 2003


> Only how I get the mouseFocus set is a bit of a puzzle

My point was that you wouldn't "get" it you would "set" it ;-) E.g., in
#dispatchEvent: you just answer "yeah, I've done it, shut up" and set the
mouse focus to yourself. From then on, you'll get the events delivered
through #handleFocusEvent: and can pass them on right into your own event
dispatcher.

> and I want to move the handleXXX methods out of the UI object
> and into the dispatcher to prevent "accidental" overrides that
> hose up core mechanisms (like balloons and halos).

No problem with the above - there are only two entry points used, one of
which you have already covered.

> I wasn't aware of the doOnlyOnce: method, looks like I 
> reimplemented it on a per-object basis.  Thanks for the tip.

You're welcome. Note that the "on a per object basis" approach can be
dangerous (which is why I don't use it) - for example, when a debugger gets
opened you create a new object so if there's a bug which affects the
debugger you're screwed. For recursive methods it's typically much easier to
refactor the "workload" into a separate method and have the recursion go
along pretty much the way it is.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list