[Roassal2] Pharo 4 MouseWheelEvent compatibility

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Roassal2] Pharo 4 MouseWheelEvent compatibility

Jan Blizničenko
Hello

We use Roassal on Pharo 4, but we ran across another compatibility issue.
On Pharo 4, MouseWheelEvent class got a little rework. It does not use symbols #up and #down as direction anymore, not even via accessors. TRMouseWheelEvent copies this direction, so because RTZoomableView looks for these symbols, it is no longer working on Pharo 4 (mouse wheel now just moves camera, but does not change scale).
More info about this Pharo 4 change you might find here: http://forum.world.st/MouseWheelEvent-direction-in-Pharo-4-tp4806863p4806864.html

I tried to make few changes to make it compatible in both Pharo 3 and 4.
One option is just adding two methods into TRMouseWheelEvent which convert Pharo 4 direction to Pharo 3 direction, so only interface change is when creating TRMouseWheelEvent, usage of this event is absolutely same. http://www.mediafire.com/download/es70j9dko45da2b/mouseWheel_pharo3like.zip
Second option is to rework TRMouseWheelEvent in the same way MouseWheelEvent got changed, so they will have same usage on Pharo 4, but it means even interface of TRMouseWheelEvent changes and everything that asks for its direction has to be changed, too. http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip
Third option is to use your own solution instead of mine.
And last solution might be just ignoring it and not trying to be compatible with both Pharo versions.

Jan Blizničenko
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal2] Pharo 4 MouseWheelEvent compatibility

abergel
Hi Jan!

Thanks for looking into this!
Keeping Roassal backward compatible with Pharo 3 is not a priority. Can you provide a .mcz or a change set of your fix please? I would be happy to include it in the main release of Roassal.

Cheers,
Alexandre


> On Feb 22, 2015, at 4:47 PM, Jan B. <[hidden email]> wrote:
>
> Hello
>
> We use Roassal on Pharo 4, but we ran across another compatibility issue.
> On Pharo 4, MouseWheelEvent class got a little rework. It does not use
> symbols #up and #down as direction anymore, not even via accessors.
> TRMouseWheelEvent copies this direction, so because RTZoomableView looks for
> these symbols, it is no longer working on Pharo 4 (mouse wheel now just
> moves camera, but does not change scale).
> More info about this Pharo 4 change you might find here:
> http://forum.world.st/MouseWheelEvent-direction-in-Pharo-4-tp4806863p4806864.html
>
> I tried to make few changes to make it compatible in both Pharo 3 and 4.
> One option is just adding two methods into TRMouseWheelEvent which convert
> Pharo 4 direction to Pharo 3 direction, so only interface change is when
> creating TRMouseWheelEvent, usage of this event is absolutely same.
> http://www.mediafire.com/download/es70j9dko45da2b/mouseWheel_pharo3like.zip
> Second option is to rework TRMouseWheelEvent in the same way MouseWheelEvent
> got changed, so they will have same usage on Pharo 4, but it means even
> interface of TRMouseWheelEvent changes and everything that asks for its
> direction has to be changed, too.
> http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip
> Third option is to use your own solution instead of mine.
> And last solution might be just ignoring it and not trying to be compatible
> with both Pharo versions.
>
> Jan Blizničenko
>
>
>
> --
> View this message in context: http://forum.world.st/Roassal2-Pharo-4-MouseWheelEvent-compatibility-tp4806885.html
> Sent from the Moose mailing list archive at Nabble.com.
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal2] Pharo 4 MouseWheelEvent compatibility

Jan Blizničenko
Well, since Pharo 4 has not official stable release yet, I will stick to my few additional lines of code making it compatible with both Pharo 3 and 4.

I added mcz files to both archives, so...
The one with changed API to the one of new MouseWheelEvent (which I prefer): http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip
The one with same API as old MouseWheelEvent and TRMouseWheelEvent, except of instance creation (because it uses my new metod which translates Pharo 4 to Pharo 3-like event directions): http://www.mediafire.com/download/es70j9dko45da2b/mouseWheel_pharo3like.zip

About change set... what is it and how could I have got it? :)

Jan

abergel wrote
Hi Jan!

Thanks for looking into this!
Keeping Roassal backward compatible with Pharo 3 is not a priority. Can you provide a .mcz or a change set of your fix please? I would be happy to include it in the main release of Roassal.

Cheers,
Alexandre


> On Feb 22, 2015, at 4:47 PM, Jan B. <[hidden email]> wrote:
>
> Hello
>
> We use Roassal on Pharo 4, but we ran across another compatibility issue.
> On Pharo 4, MouseWheelEvent class got a little rework. It does not use
> symbols #up and #down as direction anymore, not even via accessors.
> TRMouseWheelEvent copies this direction, so because RTZoomableView looks for
> these symbols, it is no longer working on Pharo 4 (mouse wheel now just
> moves camera, but does not change scale).
> More info about this Pharo 4 change you might find here:
> http://forum.world.st/MouseWheelEvent-direction-in-Pharo-4-tp4806863p4806864.html
>
> I tried to make few changes to make it compatible in both Pharo 3 and 4.
> One option is just adding two methods into TRMouseWheelEvent which convert
> Pharo 4 direction to Pharo 3 direction, so only interface change is when
> creating TRMouseWheelEvent, usage of this event is absolutely same.
> http://www.mediafire.com/download/es70j9dko45da2b/mouseWheel_pharo3like.zip
> Second option is to rework TRMouseWheelEvent in the same way MouseWheelEvent
> got changed, so they will have same usage on Pharo 4, but it means even
> interface of TRMouseWheelEvent changes and everything that asks for its
> direction has to be changed, too.
> http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip
> Third option is to use your own solution instead of mine.
> And last solution might be just ignoring it and not trying to be compatible
> with both Pharo versions.
>
> Jan Blizničenko
>
>
>
> --
> View this message in context: http://forum.world.st/Roassal2-Pharo-4-MouseWheelEvent-compatibility-tp4806885.html
> Sent from the Moose mailing list archive at Nabble.com.
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal2] Pharo 4 MouseWheelEvent compatibility

abergel
> The one with changed API to the one of new MouseWheelEvent (which I prefer):
> http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip

Integrated in Roassal!
Thanks!

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal2] Pharo 4 MouseWheelEvent compatibility

Jan Blizničenko
Hi

I'm unburying this topic, because Pharo 4 got released, so there probably won't be any need for Pharo 3 compatibility anymore.
I removed my method translating Pharo 3 MouseWheelEvent directions into Pharo 4 ones, so in Pharo 4 (and 5) TRMouseWheelEvent instance creation will save few nanoseconds (which could once make almost a millisecond of your life! :) ), but in Pharo 3 mouse wheel will do nothing.

This mcz is doing it: http://www.mediafire.com/download/36jjvzmwaowjq7t/Trachel-bliznjan.276.zip

Jan

abergel wrote
> The one with changed API to the one of new MouseWheelEvent (which I prefer):
> http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip

Integrated in Roassal!
Thanks!

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal2] Pharo 4 MouseWheelEvent compatibility

abergel
Excellent!

Included!!!

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 17, 2015, at 10:21 AM, Jan Blizničenko <[hidden email]> wrote:

Hi

I'm unburying this topic, because Pharo 4 got released, so there probably
won't be any need for Pharo 3 compatibility anymore.
I removed my method translating Pharo 3 MouseWheelEvent directions into
Pharo 4 ones, so in Pharo 4 (and 5) TRMouseWheelEvent instance creation will
save few nanoseconds (which could once make almost a millisecond of your
life! :) ), but in Pharo 3 mouse wheel will do nothing.

This mcz is doing it:
http://www.mediafire.com/download/36jjvzmwaowjq7t/Trachel-bliznjan.276.zip

Jan


abergel wrote
The one with changed API to the one of new MouseWheelEvent (which I
prefer):
http://www.mediafire.com/download/38lwuwr1eauuur0/mouseWheel_pharo4like.zip

Integrated in Roassal!
Thanks!

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list

Moose-dev@.unibe

https://www.iam.unibe.ch/mailman/listinfo/moose-dev





--
View this message in context: http://forum.world.st/Roassal2-Pharo-4-MouseWheelEvent-compatibility-tp4806885p4820230.html
Sent from the Moose mailing list archive at Nabble.com.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev