[Haskell-cafe] Re: [Haskell] ANNOUNCE: GLUT 184.108.40.206
Sven.Panne at aedion.de
Mon Aug 17 02:17:28 EDT 2009
Am Sonntag, 16. August 2009 22:10:23 schrieb Rafael Gustavo da Cunha Pereira
> BTW, as an enhancement for 220.127.116.11, you could treat unnamed mouse buttons.
> Mouses with more axis and more buttons are becoming increasingly common,
> and "unmarshalMouseButton" is not prepared to accept them!!
> Here are exceptions I caught, playing with my Genius Traveler 515 mouse:
> unmarshalMouseButton: illegal value 5
> unmarshalMouseButton: illegal value 6
> unmarshalMouseButton: illegal value 7
> unmarshalMouseButton: illegal value 8
Good point, I had similar reports already, but I simply forgot to handle this
in yesterday's release. The right way to handle this would probably be
extending the MouseButton data type with an 'AdditionalButton Int' constructor
and simply pass the unknown button numbers via this case. I am not so sure
about a nice name for this constructor: AdditionalButton? GenericButton? Or
simply MouseButton, just like the type itself?
More information about the Haskell-Cafe