[pygtk] Button connect() execution

Paul Borghese pborghese at gmail.com
Wed Oct 25 06:30:36 WST 2006


Hi Everyone,

Let's say I have the following code:

   OkButton.connect("clicked", self.ButtonFunction,ComboBox.get_active_text
())
**
I assumed the function ComboBox.get_active_text() is determined after the
button was clicked.  Instead the function get_active_text() seems to be
executed at run-time. The value of get_active_text() determined at run-time
is used for the connect variable even if the active text in the ComboBox has
changed.

So let's say the ComboBox has the following Values:

AAAAA
BBBBB

Initially, AAAAA is selected.  If the user selects BBBBB and then presses
the OkButtton, the function ButtonFunction is sent the value AAAAA and not
BBBBB.

Anyone interested in clarification of this behavior?

Thanks for your help!

Paul Borghese
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20061024/8a9ff99e/at=
tachment.htm


More information about the pygtk mailing list