Correction for The Book



Hello,

Here is a minor correction to the online book "Programming with gtkmm2".

Under 8 The Treeview widget / The Selection / The selected rows, there are these lines of code:

For multiple-selection, you need to define a callback, and give it to selected_foreach(), like so:

refTreeSelection->selected_foreach(
    sigc::mem_fun(*this, &TheClass::selected_row_callback) );

...


This does not compile, but it compiles when changed to this:


refTreeSelection->selected_foreach_iter(
    sigc::mem_fun(*this, &TheClass::selected_row_callback) );


Could this be modified in the book?

Thanks,

Teus.



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