GNOME Bugzilla – Bug 583702
Potential error in "Programming with gtkmm" Ch. 17, Paste section
Last modified: 2009-06-02 09:02:15 UTC
In the chapter 17 paste section example "Discovering the available targets," the example code sets a callback to on_clipboard_received_targets: refClipboard->request_targets( sigc::mem_fun(*this, &ExampleWindow::on_clipboard_received_targets) ); which is defined as: void ExampleWindow::on_clipboard_received( const Gtk::SelectionData& selection_data) { Glib::ustring clipboard_data = selection_data.get_data_as_string(); //Do something with the pasted data. } but the request_targets slot (slotTargetsReceived) passes a Glib::StringArrayHandle to the callback and not Gtk::SelectionData.
Yes. Thanks. Corrected in git: 2009-06-02 Murray Cumming <murrayc@murrayc.com> * docs/tutorial/C/gtkmm-tut.xml: Clipboard: Paste: Discovering Available Targets: Corrected the parameter types of the callback slot based on the correctly-compiling code in examples/book/clipboard/ideal/examplewindow.cc. Bug #583702 (Jason Curole) This will be updated eventually on the web site: http://gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-clipboard-paste.html