Re: [gtk-list] Re: ScrolledWindow in GTK--



Tero Pulkkinen wrote:

> >   if ( ptTree )
> >   {
> >     ptScrolledWnd->remove (ptTree);
> >     delete ptTree;
> >   }
> 
> are you sure ptTree was initialized to zero. Maybe ptTree pointer is
> messed up..

 Yes. ptTree is initialized to NULL. It was working before with VBox.

> The problem that gtk is giving means that the object you're trying to
> remove from the container has not been inserted to your scrolledwindow.
> (== its parent is not scrolledwindow... => you cannot add same object
> to more than one container..)

 First time it's called, ptTree is NULL, so it is not destroyed. It is
created and it works. After that, each time I call this function, the
message you have seen is displayed.

> Does it say the message only first time, or every time you go there or
> always except the first time?

 Always except the first time.

 Angel.



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