[Haskell-cafe] is gldrawingarea an instance of widgetclass

Yuras Shumovich 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.
http://stackoverflow.com/questions/27301221/haskell-http-client-using-bytestring/27301808#27301808

Thanks,
Yuras

> 
> then
> 
>   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.
> 
> ??
> 
> 
> Thanks,
> 
> Brian
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




More information about the Haskell-Cafe mailing list