Morphic event refactoring

Raab, Andreas Andreas.Raab at disney.com
Tue Oct 17 04:00:29 UTC 2000


Lex, Ned,

Just FYI - this discussion is a bit besides the point. #worldUnderCursor was
only necessary because the Hand tried to figure out for itself who should
get what event and under what conditions. This has changed very recently
(the stuff Dan was referring to as being still a bit radioactive ;-) and now
the morphs itself are responsible for dispatching the events. Which solves
the problem implicitly and completely.

  - Andreas

> -----Original Message-----
> From: Lex Spoon [mailto:lex at cc.gatech.edu]
> Sent: Monday, October 16, 2000 11:59 AM
> To: squeak at cs.uiuc.edu
> Cc: recipient list not shown
> Subject: re: Morphic event refactoring
> 
> 
> 
> Even better, query the World variable, and update it whenever you are
> traversing down through the morphic hierarchy.  Obvious 
> places that this
> kind of traversal happens are:
> 
> 	1. in startSteppingBlahBlohOf: .
> 	2. when finding the morph to send an event to.
> 	3. when traversing via drawOn:
> 
> Basically, it would be nice if morphic code always used submorphsDo:
> instead of submorphs do:, in which case submorphsDo: could be modified
> to update World as necessary.  Something would need to be 
> done to handle
> errors, as well.
> 
> Overall, this approach works as long as you are running in the main
> Morphic thread.  If you are running in a separate thread, 
> then you need
> to be more specific about which world you are asking for, anyway.
> 
> 
> -Lex
> 
> 
> 
> 
> Ned Konz <ned at bike-nomad.com> wrote:
> > With regards to the Morphic event improvement now going on at SqC,
> > just one observation:
> > 
> > >From a message tally, it's apparent that a lot of the work being
> > done in Morphic is just finding the world under the cursor.
> > 
> > For instance, in a typical session, Morphic spent 14% of its time
> > looking for worlds in PluggableTextMorphs.
> > 
> > An obvious optimization here would be to maintain a global 
> collection
> > of worlds that could be queried, instead of traversing the entire
> > collection of Morphs depth-first.
> > 
> > This could help power consumption considerably in PDA versions,
> > along with getting the event VM to work right.
> > 
> > -- 
> > Ned Konz
> > currently: Stanwood, WA
> > email:     ned at bike-nomad.com
> > homepage:  http://bike-nomad.com
> 





More information about the Squeak-dev mailing list