ruby-****@sourc*****
ruby-****@sourc*****
2009年 2月 6日 (金) 00:38:46 JST
------------------------- REMOTE_ADDR = 74.15.84.244 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-itrsmrks ------------------------- @@ -124,11 +124,11 @@ The other method for retrieving text iterators in our function called "retrieve_text" is Gtk::TextBuffer#bounds. It returns an array with the starting and ending Gtk::TextIter objects, which identify the selected text interval in the text buffer. -When you have the two iterators you have to supply them to Gtk::TextBuffer#get_text(start, end, show_invisible=false), to retrieve the selection. Unfortunately Gtk::TextBuffer#get_text currently does not work as expected. +When you have the two iterators you have to supply them to Gtk::TextBuffer#get_text(start, end, show_invisible=false), to retrieve the selection. {{image_right("dialog-warning.png")}} -Those of you who wish see the identical C GTK+ program, that does work, can click on this link ((<"C GTK+ program: Using Text Iterators"|tut-gtk2-txtw-itrsmrks-cgtk-01>)) (you will be making a short detour into C GTK+). +Unfortunately Gtk::TextBuffer#get_text currently does not work as expected. Those of you who wish see the identical C GTK+ program, that does work, can click on this link ((<"C GTK+ program: Using Text Iterators"|tut-gtk2-txtw-itrsmrks-cgtk-01>)) (you will be making a short detour into C GTK+). :Caution: When the above Gtk::TextBuffer#get_text will work, you should be careful that there are no images or other non-textual object in the text buffer, since the character positions will because of this most likely be off. In such cases you should use Gtk::TextBuffer#get_slice instead.