Re: GLib critical message
- From: Carlos Lopez Gonzalez <carloslopezgonzalez yahoo es>
- To: Murray Cumming <murrayc murrayc com>
- Cc: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: Re: GLib critical message
- Date: Wed, 29 Jun 2011 16:48:25 +0100 (BST)
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 <murrayc murrayc com>
Para: Carlos Lopez Gonzalez <carloslopezgonzalez yahoo es>
CC: Kjell Ahlstedt <kjell ahlstedt bredband net>; "gtkmm-list gnome org" <gtkmm-list gnome org>
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());
--
murrayc murrayc comwww.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]