[Haskell-cafe] is gldrawingarea an instance of widgetclass
shumovichy at gmail.com
Wed Dec 24 08:46:35 UTC 2014
On Tue, 2014-12-23 at 23:03 -0800, briand at aracnet.com wrote:
> I get this :
> No instance for (Gtk.WidgetClass GtkGL.GLDrawingArea)
> arising from a use of `Gtk.boxPackStart'
> in code that was compiling at one point.
> This is how I'm importing
> import qualified Graphics.UI.Gtk.OpenGL as GtkGL
Is your code cabalized? If not, then probably you indirectly depend on
different versions of gtk. For example, GLDrawingArea is instance of
WidgetClass from one version of gtk, but you need the instance from
other version of gtk. Check `ghc-pkg list gtk`.
There is a number of related questions on SO, e.g.
> glCanvas <- GtkGL.glDrawingAreaNew glconfig
> and use it thusly:
> Gtk.boxPackStart hBox1 glCanvas Gtk.PackNatural 0
> boxPackStart wants something WidgetClass, and GLDrawingArea seems to be an instance of widget class.
> The gtkglext hasn't been touched in quite a while. I'm wondering if it's become out of date with the latest gtk.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe