Ticket #1126 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

drawWindowGetPointer raises "NonExhaustivePattern" or something...

Reported by: guest Owned by: somebody
Priority: normal Milestone:
Component: general (Gtk+, Glib) Version: 0.9.12
Keywords: drawWindowGetPointer, non exhaustive pattern Cc: dignor.sign@…


..when called inside a callback for onScroll... anyways in Events.hsc there is that little function "toModifier" which is used for everything else and that works. It have a nice comment:

-- Turn an int into a modifier.
-- * Use instead of (toFlags . fromIntegral) since the latter will fail
--   if flags are set for which no constructor exists

which is exactly what gets done in DrawWindow.hsc.pp, and then the error. I would gladly post a patch, but I'm not very skilled on making patches. The obvious fix however worked for me:

  • Export toModifier in the Events module
  • import it in DrawWindow
  • change (toEnum (fromIntegral m) ) by toModifier (... m). The three dots represents my ugly hack for converting a Word to a CInt.

Change History

Changed 7 years ago by axel

  • status changed from new to closed
  • resolution set to fixed

I remember that we've fixed this. Duplicate of #1125.

Changed 7 years ago by Alvaro

Note: See TracTickets for help on using tickets.