ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 15日 (土) 09:27:01 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-itrsmrks ------------------------- @@ -135,7 +135,7 @@ It is not to be expected that a serious reader of this tutorial would have any difficulty understanding the main body of this example program. You may have guessed that the most important processing is happening in two top level methods (defined for Object object)((*insert_text*)) and((*retrieve_text.*)) -In insert_text(entry, textview) we first have to retrieve the text mark, which is next translated into text iterator, and then in turn used to insert a string from Gtk::Entry text field into the text buffer. +In insert_text(entry, textview) we first have to retrieve the text mark, which is next translated into text iterator, which is then in turn used to insert a string from Gtk::Entry text field into the text buffer. In the retrieve_text(textview) we first obtain two text iterators representing start/end positions of the selected (highlighted) text, which are subsequently used to obtain the marked (selected) text from the text buffer if any selection was made, else the entire buffer is retrieved. In both cases the results are printed on the console.