PyGTK + Glade = weird problem
gsteff
greg.steffensen at gmail.com
Fri Feb 24 22:58:22 EST 2006
Sorry about that. Your problem is that the show_hide_janela method is
setup to be called both on a gtk signal ("destroy") and an
event("delete_event"). Callback methods for events take a slightly
different signature than signals; they take one extra argument, which
represents the triggering event. When you close the window, the
delete_event is triggered, which calls show_hide_janella, but the call
fails, because show_hide_janella is called with 3 arguments, when its
only expecting 2. So, to fix the code you have posted in the thread
you linked, replace the line
def show_hide_janela(self,obj):
with the line
def show_hide_janela(self,obj, event=None):
The modified code works on my machine. Hope this helps,
Greg
More information about the Python-list
mailing list