On Tue, Apr 01, 2003 at 06:07:29PM +0200, Herr Maik HERTHA wrote:
> >However, in your case I honestly don't think this complication is at all
> >justified. If all you want to do is pop up a dialog window on
> >double-click, why don't you just check double-click, select the row your
> >event object is positioned over, and show the dialog? Why do you need to
> >use two callbacks chained? It's too weird for me.
> >  
> >
> It is my approach of event-driven applications. There is only one 
> responsible callback to show the dialog.

See, I don't understand what you mean by this. Why can't you have a
method called show_dialog() which is called by N different callbacks?
One of them could be a double-click on the row, another could be a
menuitem you select, etc.

> If you only select the row and use the button it is clear. But if I 
> define a "short-cut-action" for the user this
> dialog should be raised by the same signal. So I transform this event in 
> the equal app-signal "button-was-clicked".

Just make both methods call self.show_dialog().

> On a  MSWindows box you send a message. On Unix I use this 
> "event-signal-transformation".

In Python you can `send a message' by calling a method. You can also
define your own signals in PyGTK2 and emit them. This makes sense when
you won't have a reference to the method you want to call at callback
time (and ends up allowing you to avoid storing state a number of
times).

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to