Potential error in "Programming with gtkmm" Ch. 17, Paste section



Hi all,

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.

Thanks, Jason


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]