It seems, for Morphic, a world is the best mapping to a host window (would subscribe to relevant events). Sadly, a lot of Morphic relies on the "main" world, still, worth investigating. Certainly a *lot* more work to map a SystemWindow to a host window for a general case. As far a Polymorph goes, I'd be happy to adapt to whatever scheme you decide :-) Regards, Gary. ----- Original Message ----- From: "Igor Stasenko" <siguctua@gmail.com> To: "Pharo Development" <pharo-project@lists.gforge.inria.fr> Sent: Wednesday, November 19, 2008 4:52 PM Subject: Re: [Pharo-project] Host window events
My vision, how things should happen , is following:
EventSensor checks an event type in it's newly acqured raw event buffer from VM. Then it dispatching an event handling in following way:
eventClass := (eventTypes at: (rawEvent at: EventType "1"). event := (eventClass from: rawEvent). "Translate raw event into nice XXXXEvent instance" event handle. "dispatch event"
Now, if event type is window event, eventClass would be, lets say HostWindowEvent. And in #handle it does following:
hostWindow := self window. hostWindow subscriber handle: self.
Here the main question, should HostWindow have a notion of subscriber(s) (as part of its state), or maybe there should be more generic way to wire a subscriber(s) with particular HostWindow instance, but without need in managing subscribers by HostWindow itself.
-- Best regards, Igor Stasenko AKA sig.
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project