The idea behind this change was to not rely on any symbol #up or character but ask the event directly: event isUp event isDown ... see issue 4795 <https://pharo.fogbugz.com/default.asp?4795> Horizontal wheel events and 14907 <https://pharo.fogbugz.com/default.asp?14907> #mouseWheel: knows too much This is in Pharo4 and the external packages Athens and TxText are already changed to use the new methods but their updated versions aren't integrated in Pharo4 yet. nicolai 2015-02-22 12:32 GMT+01:00 Jan B. <bliznjan@fit.cvut.cz>:
Hello
In latest builds of Pharo 4 (in last 2 months probably), there has been a change in settings of mouse wheel event creation. In HandMorph >>#generateKeyboardEvent:
In Pharo 3 there is MouseWheelEvent created by calling MouseWheelEvent new setType: #mouseWheel position: lastMouseEvent cursorPoint direction: (charCode = 30 ifTrue: [#up] ifFalse: [#down]) buttons: buttons hand: self stamp: stamp
In latest Pharo 4 image, there is MouseWheelEvent created by calling MouseWheelEvent fromCharacter: charCode asCharacter position: lastMouseEvent cursorPoint buttons: buttons hand: self stamp: stamp
There is a difference in what it results into, especially in MouseWheelEvent's instance variable direction. Pharo 3 sets direction to #up, Pharo 4 sets it to Character arrowUp.
My question is whether direction being Character arrowUp is bug or feature, therefore if it should be fixed on Pharo side by using #up direction in MouseWheelEvent like before, or if it should be fixed on users side (Roassal for example), which currently compare it to symbol #up and should all compare it to Character arrowUp from now on.
Jan
-- View this message in context: http://forum.world.st/MouseWheelEvent-direction-in-Pharo-4-tp4806863.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.