Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2009-01-05 Thread Walter Leibbrandt
Hi everybody, I hope everyone had a very festive season and that 2009 will be a great year for everyone! :) Yang Zhang wrote: > Well, another problem is that I don't want this to just fire when text > is being inserted. I'm building an auto-completion widget, so if > someone deletes text or i

Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2008-12-30 Thread John Finlay
Yang Zhang wrote: > Hi, I have a signal handler connected to an Entry's 'changed' signal, > but it never sees the updated cursor position, only the previous cursor > position. E.g., if I start with an empty Entry and then type 'a', > Entry.get_text() returns 'a', but Entry.get_position() return

Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2008-12-30 Thread Yang Zhang
Gian Mario Tagliaretti wrote: > On Tue, Dec 30, 2008 at 3:59 PM, Gian Mario Tagliaretti > wrote: > >> use the "insert-text" instead: > > oh.. I just noticed that it works correctly only if you input text, if > you copy the position is wrong, filing a bug > > cheers Well, another problem is

Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2008-12-30 Thread Gian Mario Tagliaretti
On Tue, Dec 30, 2008 at 3:59 PM, Gian Mario Tagliaretti wrote: > use the "insert-text" instead: oh.. I just noticed that it works correctly only if you input text, if you copy the position is wrong, filing a bug cheers -- Gian Mario Tagliaretti GNOME Foundation member gia...@gnome.org

Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2008-12-30 Thread Gian Mario Tagliaretti
On Tue, Dec 30, 2008 at 12:49 PM, Yang Zhang wrote: Hi Yang, > Hi, I have a signal handler connected to an Entry's 'changed' signal, use the "insert-text" instead: import gtk def on_change(widget, new_text, new_text_length, position): print 'inserted text = ', new_text print 'inserted

[pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2008-12-30 Thread Yang Zhang
Hi, I have a signal handler connected to an Entry's 'changed' signal, but it never sees the updated cursor position, only the previous cursor position. E.g., if I start with an empty Entry and then type 'a', Entry.get_text() returns 'a', but Entry.get_position() returns 0, not 1. I tried bot