more problems with Gtk::Style derived class



this code give with the following errors:

(a.out:26092): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion
`G_IS_OBJECT (object)' failed

(a.out:26092): GLib-GObject-CRITICAL **: g_type_class_peek_parent: assertion
`g_class != NULL' failed

here is the test code:

class mystyle : public Gtk::Style
{
  public:
     static Glib::RefPtr <mystyle> create()
     {
	return Glib::RefPtr <mystyle> (new mystyle);
     }

  protected:
     mystyle() : Gtk::Style(), Glib::ObjectBase("mystyle")
     {
     }
};

int main (int argc, char **argv)
{
   Gtk::Main mainkit(argc, argv);

   Glib::RefPtr <mystyle> style = mystyle::create();
   GtkStyle *gtkstyle = gtk_style_copy(style -> gobj());

   return 0;
}

José, Seems similar to the bug you fixed on Monday. what do you think?
should I open a new bug?

thanks
-- 
View this message in context: http://old.nabble.com/more-problems-with-Gtk%3A%3AStyle-derived-class-tp30127741p30127741.html
Sent from the Gtkmm mailing list archive at Nabble.com.



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