Hi!
If I add it to the constructor:
class studio::ValueBase_Entry : public Gtk::EventBox, public Gtk::CellEditable
{
Glib::ustring path;
Widget_ValueBase *valuewidget;
bool edit_done_called;
Gtk::Widget *parent;
public:
ValueBase_Entry():
Glib::ObjectBase (typeid(ValueBase_Entry)),
Gtk::EventBox (),
Gtk::CellEditable ()
{
Gtk::CellEditable::add_interface(get_type());
...
...
}
I obtain this after build:
cellrenderer/cellrenderer_value.cpp: In constructor
'studio::ValueBase_Entry::ValueBase_Entry()':
cellrenderer/cellrenderer_value.cpp:86: error: reference to 'get_type' is
ambiguous
/usr/include/glibmm-2.4/glibmm/interface.h:67: error: candidates are: static
GType Glib::Interface::get_type()
/usr/include/gtkmm-2.4/gtkmm/celleditable.h:100: error: static
GType Gtk::CellEditable::get_type()
/usr/include/gtkmm-2.4/gtkmm/eventbox.h:87: error: static GType
Gtk::EventBox::get_type()
So I decided to use the Glib::Interface::get_type() one.
It builds fine and run the application gives:
(synfigstudio:4816): GLib-GObject-CRITICAL **: Object class
gtkmm__CustomObject_N6studio15ValueBase_EntryE doesn't implement property
'editing-canceled' from interface 'GtkCellEditable'
(synfigstudio:4816): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
Same message for Gtk::CellEditable::get_type()
If I use Gtk::EventBox::get_type() I obtain:
synfigstudio:6544): GLib-GObject-CRITICAL **: Object class
gtkmm__CustomObject_N6studio15ValueBase_EntryE doesn't implement property
'editing-canceled' from interface 'GtkCellEditable'
(synfigstudio:6544): GLib-GObject-CRITICAL **: Object class gtkmm__GtkEventBox
doesn't implement property 'editing-canceled' from interface 'GtkCellEditable'
(synfigstudio:6544): GLib-GObject-WARNING **: cannot add interface type
`GtkCellEditable' to type `gtkmm__GtkEventBox', since type `gtkmm__GtkEventBox'
already conforms to interface
Any idea?
________________________________
De: Murray Cumming <[email protected]>
Para: Carlos Lopez Gonzalez <[email protected]>
CC: Kjell Ahlstedt <[email protected]>; "[email protected]"
<[email protected]>
Enviado: lunes 27 de junio de 2011 11:05
Asunto: Re: GLib critical message
On Sun, 2011-06-26 at 14:17 +0100, Carlos Lopez Gonzalez wrote:
> Thanks Kjell,
>
> The scenario in your examples is very similar to mine.
>
> I think that it can be caused by a missing implementation of that
> property at gtkmm bindings form gtk.
> Maybe some of the gtkmm developers can give other explanation.
> Cheers
Does it help to call this in your constructor?
Gtk::CellEditable::add_interface(get_type());
--
[email protected]
www.murrayc.com
www.openismus.com_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list