Trouble swapping contents of a container




I have an application that displays a different window in
a certain part of a screen depending on which tree item is
selected in another window.  I've already done this 
successfully with one windoow (actualyl a set of windows
inside a table). I just use gtk_container_children and
g_list_nth_data() and then do gtk_container_remote
on the old window and a gtk_container_add on the
window I want to have displayed. This works great.
Now I am trying to do it with a gtk_text window also.
THis doesn't seem to be working so well.
I get the following errors when I try it:

** WARNING **: file gtkcontainer.c: line 359 
(gtk_container_remove): "widget->parent == GTK_WIDGET (container)"
** WARNING **: file gtkcontainer.c: line 346 
(gtk_container_add): "widget->parent == NULL"

And when I look at things with a debugger.. The contents
of the container (in this case a frame) when I add it 
seem different when I pull it out later.. 

So to summarize, this works great in the case of a frame
and a bunch of gtk_tables but doesn't work with
a frame and a gtk_text window. 

Does anyone know of any gotchas for doing what I am try
to do? Does anyone have an application that does this
that I can look at?

	-Scott



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