Re: a new combo box



On Sat, Dec 27, 2014 at 10:52:27PM +0900, Tristan Van Berkom wrote:
From a quick look at gtkcombobox.h, the only really problematic part
is the tabular menu nonsense (set_wrap_width(), set_row_span_column(),
set_column_span_column()). Is there any way we could get around that ?
perhaps just an additional GtkComboBox subclass which explicitly does
not support those tabular menu things and thus would not be an API
break ?

Overriding a function with a NOP is generally not a good idea, it breaks
the logic of inheritance. A derived type should be a specialization of
its base class. The derived type *is* also (a kind of) the base class.
If the base class supports operations A and B but a derived class
doesn't, then the derived class is *not* a kind of the base class,
logically. The inheritance hierarchy should be reversed in that case, so
that only the derived class supports operations A and B. Or create a
common base class or interface with two subclasses.

Sébastien


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