How to implement Gtk::Orientable interface?
- From: Tom Schoonjans <tom schoonjans me com>
- To: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: How to implement Gtk::Orientable interface?
- Date: Wed, 25 Oct 2017 09:40:03 +0100
Hi all,
I have a class that derives from Glib::Object that should implement Gtk::Orientable. I thought it would be
sufficient to just do:
class MyClass : public MyParentClass, ::Gtk::Orientable {
public:
MyClass() : Glib::ObjectBase(“MyClass"), MyParentClass(), Gtk::Orientable() {}
};
Even though this compiles without problems, I do get into trouble at runtime with errors like:
(test1:35777): GLib-GObject-WARNING **: attempting to add an interface (GtkOrientable) to class
(gtkmm__CustomObject_MyClass) after class_init
(test1:35777): Gtk-CRITICAL **: gtk_orientable_get_orientation: assertion 'GTK_IS_ORIENTABLE (orientable)'
failed
(test1:35777): Gtk-CRITICAL **: gtk_orientable_get_orientation: assertion 'GTK_IS_ORIENTABLE (orientable)'
failed
I have tried changing the order of the parent constructors but that doesn’t seem to make a difference.
I would be very grateful for any help!
Thanks in advance and best regards,
Tom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]