I'm very sorry,

I thought the changes to my code were very simple, and so I did not create a
test case.  Now I've realised this problem is not simple at all, and even 
that I may not have fixed the bug in my program at all.  It appears that 
something chaotic is happening, perhaps a race condition somewhere in the 
GTK code.  I'll get back to you guys when I have some idea of what is going 
on.

Timothy


---------- Původní zpráva ----------
Od: Axel Simon <axel.si...@in.tum.de>
Datum: 2. 12. 2012
Předmět: Re: [Gtk2hs-devel] panedAdd1 has the wrong type

"Paned will accept any widget as child, so the patch is incorrect. I'm 
surprised that it should change something semantically, since all the Gtk2Hs
type conversations are no-ops at the end of the day.

Cheers,
Axel

On 01.12.2012, at 22:12, wagne...@seas.upenn.edu wrote:

> 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(http://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(http://goparallel.sourceforge.net)
> _______________________________________________
> Gtk2hs-devel mailing list
> Gtk2hs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
(https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel)


----------------------------------------------------------------------------
--
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net/(http://goparallel.sourceforge.net/)
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
(https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel)"
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to