On Sat, 01 May 2004 13:37:49 -0400
"Tim Hoeppner" <[EMAIL PROTECTED]> wrote:
> I have a notebook with 4 tabs and i was first just working on the
> first tab and everything was working great but once i started to
> create content on a different tab i get this error:
>
> assertion 'widget->parent == NULL' failed
>
> i searched for it on google and found some possible useful information
> for c but don't know how to use it in pygtk, here is the code they
> suggested:
>
> close_dialog () {
> gtk_widget_destroy(new_dialog);
> gtk_widget_destroyed(new_dialog, &new_dialog);
> }
Are you sure you're working on a *new* tab? I think you'd get that error
if you tried to append the same tab twice.
For an example, this code works for me:
self.notebook = gtk.Notebook()
self.notebook.set_tab_pos(gtk.POS_TOP)
self.notebook.set_show_tabs(FALSE)
self.adtable=gtk.Table(4, 4, FALSE)
label = gtk.Label('Admin')
self.notebook.append_page(self.adtable,label)
# add items to self.adtable
self.dbtable=gtk.Table(4, 4, FALSE)
label = gtk.Label('Database')
self.notebook.append_page(self.dbtable,label) # [1]
# add items to self.dbtable
Whereas changing [1] to
self.notebook.append_page(self.adtable,label)
gives me the error you have.
Chris
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/