On Sat, 2009-02-28 at 17:39 -0800, Krzysztof KosiĆski wrote:
Jon A. Cruz wrote:
In general that sounds good, however they should not derive from Gtk::Action. For most, a specific subclass that provides Gtk::Action would be good, but basing on Gtk::Action directly will cause MI problems among other things.
I'm not exactly sure what problems would multiple inheritance used with Gtk::Action cause. It shouldn't cause any as long all classes inherit from only one GObject-based class. In fact multiple inheritance is used in glibmm itself (look at e.g. Gtk::RecentAction).
Oh, yes. I'm very familiar with multiple inheritance.
However... most guru's who really know MI tend to avoid MI.
Java had a much better approach with its Interfaces. More modern C++ usage of MI are abstract base classes used in place of Java Interfaces.
Also... a much better C++ approach is to avoid GObject-based classes overall. That gives better reuse and more functionality.