[pygtk] repetitive get_widget() using Glade?

Skip Montanaro skip at pobox.com
Thu Aug 12 03:58:47 WST 2004


I have a simple popup window that contains a TextView widget.  The TV is
tied to a Python interpreter (code.InteractiveConsole).  The window and TV
are defined in Glade.  Works great the first time I ask to display it.

If I poke the "X" button in the window's title bar to destroy it I delete my
objects (the corresponding X windows are going away, after all) in my
destroy event handler.  I want to create a new instance the next time I
select "Interpreter Window" from my debug menu.  Unfortunately, when I call
.get_widget(...) a second time it returns None instead of a new TextView or
Window.  How do I convince Glade to create new Window and TextView widgets
on subsequent calls to get_widget()?

Thx,

-- 
Skip Montanaro
Got gigs? http://www.musi-cal.com/submit.html
Got spam? http://www.spambayes.org/
skip at pobox.com


More information about the pygtk mailing list