[ENH] MorphicEventDispatcher refactoring

Eddie Cottongim cottonsqueak at earthlink.net
Sun Jul 31 05:36:40 UTC 2005


This is a fairly straightforward refactoring; three methods had an 
essentially identical procedure for handing events to submorphs. [one 
condition had to be flipped in #mouseDown]. This doesn't have any 
performance benefit but it does make it easy to override for fast event 
dispatch for specialized clients.

But I was hoping to get some ideas to make it better. Right now, its 
slightly ugly to use a fast binary search dispatcher, because the fast 
dispatcher has to consider what kind of morph its dealing with and/or 
get itself uninstalled for regular morphs further down the chain. What 
I'm getting at is maybe it would be better to delegate the submorph 
search to Morph; then all the submorph search logic would be in one (or 
at least no more than a few) place for a given Morph, and the event 
dispatcher would stay simple and clean. In trying to accelerate things I 
find its necessary to put the binary search logic in many places and it 
would indicate a good design if this number was minimal.

Any ideas? I'm not totally sure what I want.

Thanks,
Eddie


-------------- next part --------------
A non-text attachment was scrubbed...
Name: MorphicEventDispatcherRefactoring-efc.1.cs.gz
Type: application/octet-stream
Size: 1601 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050731/90bf7bcb/MorphicEventDispatcherRefactoring-efc.1.cs.obj


More information about the Squeak-dev mailing list