Ticket #1126 (closed defect: fixed)
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@… |
Description
..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
Note: See
TracTickets for help on using
tickets.