I can't reproduce this problem. My test program is below; it correctly  
shows "foo" when I run it. Can you try to make a minimal example,  
please?
~d

import Graphics.UI.Gtk

main = do
        initGUI
        w <- windowNew
        w `onDestroy` mainQuit

        p <- hPanedNew
        v <- vBoxNew True 2
        l <- labelNew (Just "foo")

        containerAdd v l
        panedAdd1    p (castToWidget v)
        containerAdd w p

        widgetShowAll w
        mainGUI

Quoting timothyho...@seznam.cz:

> Hello,
> I just found a fun bug in GTK2HS.
>
> <span class='hs-definition'>panedAdd1</span> <span  
> class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span  
> class='hs-conid'>PanedClass</span> <span  
> class='hs-varid'>self</span><span class='hs-layout'>,</span> <span  
> class='hs-conid'>WidgetClass</span> <span  
> class='hs-varid'>child</span><span class='hs-layout'>)</span> <span  
> class='hs-keyglyph'>=></span> <span class='hs-varid'>self</span>
> <a name='line-145'></a> <span class='hs-keyglyph'>-></span> <span  
> class='hs-varid'>child</span> <span class='hs-comment'>-- ^ @child@  
> - the child to add</span>
> <a name='line-146'></a> <span class='hs-keyglyph'>-></span> <span  
> class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
> should be:
>
> <span class='hs-definition'>panedAdd1</span> <span  
> class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span  
> class='hs-conid'>PanedClass</span> <span  
> class='hs-varid'>self</span><span class='hs-layout'>,</span>  
> Container<span class='hs-conid'>Class</span> <span  
> class='hs-varid'>child</span><span class='hs-layout'>)</span> <span  
> class='hs-keyglyph'>=></span> <span class='hs-varid'>self</span>
> <a name='line-145'></a> <span class='hs-keyglyph'>-></span> <span  
> class='hs-varid'>child</span> <span class='hs-comment'>-- ^ @child@  
> - the child to add</span>
> <a name='line-146'></a> <span class='hs-keyglyph'>-></span> <span  
> class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
> I found this, because I had a VBox that I used to pass directly to panedAdd
> 1.
> Then after a remodularization I ended up calling castToWidget on said VBox. 
>  This resulted in my VBox not being added to the Paned at all :(
> Interestingly, simply doing castToContainer again didn't save me.  I had to
> create a new VBox to put my widgetized VBox into...
>
> Tim
>


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to