Re: ScrolledWindow::remove() problem

Murray Cumming <murrayc <at>> writes:

> On Sun, 2006-10-22 at 06:22 +0000, Sebasti�E.Peyrott wrote:
> [snip]
> > Whenever the app calls ScrolledWindow::remove() under 
> > Windows (XP, gtk/gtkmm 2.8), it crashes. This behaviour is not seen
> > under 
> > Linux. The contained widgets are Gtk::Layouts, and none of them are
> > managed. 
> > The only difference between the Linux build and the Windows build are
> > the 
> > headers and libraries used to build the executable. For Linux I'm
> > using 
> > gtk/gtkmm-2.8, while for Windows, gtk/gtkmm-2.6
> [snip]
> There was a bug in gtkmm 2.6 that caused managed child widgets to be
> destroyed when remove()ed from their parents. You could #ifdef for 2.6
> and add the necessary extra child.reference() to work around that bug.
> Just make sure that you don't do the extra reference with 2.8.
> But it would be better to upgrade to gtkmm 2.8 or 2.10 for all
> platforms.
Thanks for the quick response =). Well, I thought it'd be possible there was a 
bug in ScrolledWindow that caused the unexpected deletion of its children, but, 
as I said before, none of the contained widgets are actually managed. In any 
case, it does seem the child widget is getting destroyed (somehow, somewhere), 
since whenever I try to access any of its member functions I get a segfault. As 
a result, I cannot make a call to children->reference() before trying to remove 
it from the ScrolledWindow. This behaviour is also very strange, since the 
widgets are actually displayed in the ScrolledWindow and respond to user input 
which would seem to imply they were not destroyed (??).
I'll make them managed to see if there is any difference.

I'd like to upgrade to gtkmm-2.8 but I need to keep compatibility with Windows 
98, and, AFAIK you cannot use it there.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]