After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583702 - Potential error in "Programming with gtkmm" Ch. 17, Paste section
Potential error in "Programming with gtkmm" Ch. 17, Paste section
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: documentation
2.4
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-05-24 06:38 UTC by Jason Curole
Modified: 2009-06-02 09:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Curole 2009-05-24 06:38:59 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.
Comment 1 Murray Cumming 2009-06-02 09:02:15 UTC
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