Re: more problems with Gtk::Style derived class



On Wed, 2010-11-03 at 16:13 -0700, siagogam wrote:
> 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?

Yes, please file a bug.

-- 
José



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