Hi Brice,

sorry, in my last email i forgot to say that you should use
the delete_event signal instead of destroy. Then your window
will not be closed if your my_nice_and _very_usefull_callback
function returns a true value. 

BTW, this hint has given us James in the beginning of August
this year.

The error message you described has nothing to do with your
primary problem. The destroy envent delivers one argument to your 
function which you haven't declared.

Please modify your code as follows.

hope this helps and best regards 
J�rgen


On Thu, 11 Oct 2001 21:57:21 +0200
Brice VISSIERE <[EMAIL PROTECTED]> wrote:

> from mymod import my_win_class
  from GTK import *

  def my_nice_and_very_useful_callback(widget, event):
>     ...
      return TRUE
 
> def my_function():
>     my_win = my_win_class('My nice window')        # type of my_win is GtkWindow
      my_win.connect ('delete_event' , my_nice_and_very_useful_callback)
>     ...

-- 
[EMAIL PROTECTED]
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to