[prev in list] [next in list] [prev in thread] [next in thread]
List: gnome-devel-list
Subject: Re: bonobo control problem
From: Rodrigo Moya <rodrigo () gnome-db ! org>
Date: 2003-03-04 13:20:56
Message-ID: 1046784055.9153.9.camel () azkoyen ! gnome-db ! org
[Download RAW message or body]
On Sat, 2003-03-01 at 23:48, Stephen M. Przepiora wrote:
> I am trying to learn how to make a bonobo control and created a simple
> one that just makes a label. The test container I wrote seems to work
> fine with other controls so I have been concentrating on the control I
> wrote.
>
> The error I am getting is:
> (bonobo_test:5752): Bonobo-CRITICAL **: file bonobo-object.c: line 286
> (bonobo_object_unref): assertion `ao != NULL' failed
>
>
> The code for the control is small so I am pasting it in here:
>
>
> #define OAFIID "OAFIID:Bonobo_Test_Label"
>
> static BonoboObject* factory_fn (BonoboGenericFactory *this, const char
> *object_id, void *data)
> {
> GtkWidget *label = NULL;
> BonoboObject *object = NULL;
> label = gtk_label_new ("foo");
> gtk_widget_show (label);
> return BONOBO_OBJECT (label);
> }
>
this is wrong, a GtkLabel is not a BonoboObject. You should do:
label = gtk_label_new ("foo");
BonoboControl *control = bonobo_control_new (label);
return BONOBO_OBJECT (control);
cheers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic