Re: Deriving from Gtk::CellEditable

Hi Andrew,

I became curious, and tried to find an answer to your question.
Unfortunately I failed. I doubt that interfaces in glibmm and gtkmm are
meant to be used like you want to do, deriving directly from an
interface without a corresponding C class that the derived C++ class
wraps. It would be easier if you could derive your class from Gtk::Entry
instead of directly from Gtk::CellEditable, but perhaps you have a good
reason for not doing that?

If you use gdb for debugging, you can set a breakpoint at g_log, print a
backtrace, and see from where the critical message is printed. You will
see that it's printed while the constructor of Gtk::CellEditable is
being executed. So, even if you can add the necessary code in your own
constructor, it's too late. When it's reached, the message has already
been printed.

ons 2011-04-27 klockan 12:42 +0400 skrev Andrew E. Makeev:
> Hi
> I am trying to implement custom class derived from Gtk::CellEditable
> interface. When my object is creating I am getting GLIB critical:
> GLib-GObject-CRITICAL **: Object class
> gtkmm__CustomObject_N3Mgr8DateTimeE doesn't implement property
> 'editing-canceled' from interface 'GtkCellEditable'
> When I'm looked at the GTK/GTKMM sources I found that in GtkEntry for
> instance there is such call:
>   g_object_class_override_property (gobject_class,
>                                     PROP_EDITING_CANCELED,
>                                     "editing-canceled");
> and I found no alternative for it in GTKMM.
> How can I override property in my class derived from Gtk::CellEditable
> interface?
> thanks in advance,

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