Why does gtkentry.select_region() not work in gtkentry.connect()ed
functions? It works in regular functions, but not in functions called
by a signal.
Here's source (hopefully netscape won't screw up the indentation):
### - start
#!/usr/bin/env python
from gtk import *
t = [0]
def destroy(*args):
window.hide()
mainquit()
def changed(entry):
text = entry.get_text()
# entry.signal_handler_block(t[0])
# entry.set_text("asdf")
# entry.signal_handler_unblock(t[0])
entry.select_region(0, 1)
test(entry)
def test(entry) :
entry.select_region(1, 2)
window = GtkWindow(WINDOW_TOPLEVEL)
window.connect("destroy", destroy)
window.set_border_width(10)
entry = GtkEntry()
t[0] = entry.connect("changed", changed)
window.add(entry)
entry.show()
#entry.set_text("test text")
#test(entry)
window.show()
mainloop()
### - end
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk