From: oxman Date: 2005-01-15T18:36:17+09:00 Subject: Re: ruby-gnome2 : problem with signal "insert-text" Humm, after many test, I see my code is executed immediately. But the effect of my code isn't immediat. I think 'buffer' or 'textview' have a refresh period. How i can force the refresh for 'buffer' or 'textview' ? oxman wrote: > Thanks. > But the time-out to call 'insert-text' is "very long". > > buffer.signal_connect_after("insert-text") do |a,first_char,text,length| > if (text == "#") > first_char.offset = first_char.offset - 1 > last_char = buffer.get_iter_at_offset(first_char.offset) > last_char.forward_to_line_end > > buffer.apply_tag(buffer.tag_table.lookup("blue"),first_char, last_char) > end > end > > The text is colored one or two seconds after i write the '#' character. > > How i can have a signal immediately called after "insert-text" ? > > > Peter Stuifzand wrote: > >> On Fri, 14 Jan 2005 07:01:14 +0900, oxman wrote: >> >>> Hello, >>> >>> i have a problem with the signal "insert-text", the signal was >>> call before the text is insert, so i can't color it, how i can >>> have a signal just after the text have been insert ? >>> >>> thanks >>> oxman. >>> >>> >> >> >> Hello oxman, >> >> You should use: >> >> widget.signal_connect_after("nsert-text") do >> # code .... end >>