[gtkmm] tutorial appendix B on signals misleading



In the Appendix B of the tutorial there is this example:

void on_button_clicked();

class some_class
{
   void on_button_clicked();
};

some_class some_object;

main()
{
   Gtk::Button button;
   button.signal_clicked().connect( SigC::slot(&on_button_clicked) );
   button.signal_clicked().connect( SigC::slot(some_object, &some_class::on_button_clicked) );
}

After much frustration I finally found out that some_class needs to be derived from SigC::Object. Could something to this effect be added please?

njh




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