Debugging widgets

Pavlo Solntsev via gtkmm-list <[email protected]>
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <[email protected]>
Hi, 

I am trying to understand how to debug a widget. I am trying to do
something like this. This is just a test.

	Gtk::Box box;
	BOOST_TEST(box.get_homogeneous() == true);

I get the following error:

(process:25274): Gtk-CRITICAL **: 14:36:20.149:
_gtk_css_lookup_resolve: assertion '(((__extension__ ({ GTypeInstance
*__inst = (GTypeInstance*) ((provider)); GType __t =
((_gtk_style_provider_private_get_type ())); gboolean __r; if (!__inst)
__r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t)
__r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r;
}))))' failed

(process:25274): GLib-GObject-CRITICAL **: 14:36:20.149:
g_object_set_data_full: assertion 'G_IS_OBJECT (object)' failed

(process:25274): Gtk-ERROR **: 14:36:20.149: ../../checkout/gtk+-
3/gtk/gtkstylecontext.c:348:gtk_style_context_init: Can't create a
GtkStyleContext without a display connection

Since Gtk::Box is not a top level widget is has no CSS styles
associated with it. What would be the best practice to add CSS styles
(ctor?) and eventually, how to debug a widget? I assume, we don't need
to call any show() methods. 

Thanks.
-Pavlo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.