-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm using Glade 0.6.2 with Python 2.2 and PyGTK 0.6.9
My app has a combo list and I would like to get the text when an option is
chosen.
So in my callback class I have the functions defined as so:
class Callbacks:
def on_terminal_activate(w):
g.terminal = w.get_chars(0, w.get_position())
def on_terminal_changed(w):
g.terminal = w.get_chars(0, w.get_position())
However the first function gets called when I press the enter key on the combo
list and the second function gets called when I choose an entry from the drop
down list. However, when the second function is called, w.get_position()
returns 0, so I end up with no text.
When 'on_terminal_activate' is called, w.get_position() returns the proper
number so that I can get all the text.
I had thought of calling the 'on_terminal_activate' from the
'on_terminal_changed' function as so:
def on_terminal_changed(w):
self.on_terminal_activate(w)
but then I get
global name 'self' is not defined.
Am I proceeding in the right direction? If so, how can I call the activate
signl - since I use ibglade.GladeXML() to load widgets and
signal_autoconnect() to load the callbacks I cant seem to call an individual
callback. Or is there a better way to get the text out of a combo list
without having to press enter each time.
Thanks,
- --
- -------------------------------------------------------------------
Rajarshi Guha | email: [EMAIL PROTECTED]
417 Davey Laboratory | web : http:// www.jijo.cjb.net
Dept. Of Chemistry | ICQ : 123242928
Pennsylvania State University | AIM : LoverOfPanda
- -------------------------------------------------------------------
GPG Fingerprint: DCCB 4D1A 5A8B 2F5A B5F6 1F9E CDC4 5574 9017 AF2A
Public Key : http://pgp.mit.edu/
- -------------------------------------------------------------------
Absence in love is like water upon fire; a little quickens, but much
extinguishes it.
-- Hannah More
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9lOYgzcRVdJAXryoRAtszAJ9poDxGgn49cGP1d8m/f+mPDW618wCeIS02
RRNgsliP41jf/YAvuXLgj88=
=NSbA
-----END PGP SIGNATURE-----
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/