[squeak-dev] Re: Morph dragging code?

Marcel Taeumel marcel.taeumel at student.hpi.uni-potsdam.de
Sat Jan 4 13:18:20 UTC 2014


Hi, Tim!

Maybe you are missing #waitForClicksOrDrag:event:selectors:threshold: in
HandMorph, which can be used to register some callbacks for click,
double-click, and drag-start. The default callbacks are listed in
#waitForClicksOrDrag:event:.

I encapsulated a lot of event handling stuff in the class UiEventHandler,
which can be found in my Widgets project, to make use of my signals. There,
you see that I use #mouseDown: to register those callbacks (i.e.
#mouseDown:fromMorph in UiEventHandler), too. Just like the default Morphic
event handler, called EventHandler.

Maybe you could explain the whole thing by using an event handler object for
morphs. By default, there is no such event handler and programmers are
requested to overwrite #mouseDown: etc. in subclasses.

Best,
Marcel



--
View this message in context: http://forum.world.st/Morph-dragging-code-tp4734010p4734101.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list