Adding these methods to the Example class show how you can use a local helper function. The downside is you having an extra method lying around and remembering to use the right one in the right context; in C++11 you could get rid of gui_append_mainloop() by using a lambda.
Edit: This uses the approach Gavin just suggested. He's right in that I probably should have used that approach in the first place. // Extra methods for Example 5 /* Append to the textbuffer in a thread UNsafe manner. Should only * be used on the Main Loop. */ void gui_append_mainloop(const Glib::ustring& str) { Glib::ustring text = tb->get_text(); text += "\n" + str; tb->set_text(text); } /* Threadsafe access to gui_append_mainloop */ void gui_append(const Glib::ustring& str) { callback_dispatcher.send(sigc::bind(sigc::mem_fun(this, &Example::gui_append_mainloop), str)); } // Extra methods for Example 5 _______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtkmm-list