Can a no-control implement PropertyBag?



Hello!

I'm trying to implement the interface Bonobo::PropertyBag in a component
which is _not_ a Bonobo::Control, but its "main" interface inheriths from
Bonobo::Unknown. I have made a simpler example and attached the tarball.

I have had troubles implementing PropertyBag. What I have done is:

1. Added:

	<item value="IDL:Bonobo/PropertyBag:1.0"/

   to the .oafinfo file.
2. Added:

	void
	impl_bonobo_propertybag_get_prop (BonoboPropertyBag *bag,
	                                  BonoboArg         *arg,
	                                  guint              arg_id,
	                                  gpointer           user_data)
	{
	       /* do nothing by now */
	}

	void
	impl_bonobo_propertybag_set_prop (BonoboPropertyBag *bag,
	                                  const BonoboArg   *arg,
	                                  guint              arg_id,
	                                  gpointer           user_data)
	{       /* do nothing by now */
	}

   to the component source code, and:

	property_bag = bonobo_property_bag_new
			(impl_bonobo_propertybag_get_prop,
			 impl_bonobo_propertybag_set_prop,
			 echo);
	if (!property_bag) {
	        bonobo_object_unref (BONOBO_OBJECT (echo));
	        return NULL;
	}
	bonobo_object_add_interface (BONOBO_OBJECT (echo),
	                             BONOBO_OBJECT (property_bag));

  after calling bonobo_object_construct() on echo.


The client does not call any methods from Bonobo::PropertyBag, but it
calls methods from the Echo interface. When the client calls

	Bonobo_Unknown_unref (server, &ev);

to release the CORBA reference on the interface Echo, the following lines
appear:

	Gtk-WARNING **: gtk_signal_disconnect(): could not find handler (10)

	ORBit-WARNING **: PortableServer_POA_destroy not yet fully implemented;
	ignoring flags

	Gtk-WARNING **: invalid cast from (NULL) pointer to `BonoboObject'

and it sigsegv.


Attached is the tarball of the component.

I will apreciate any help on this. Thank you in advance!



	Saludos!
	Greetings!

-- 
Name:  Arturo Tena
email: arturo directmail org
ICQ:   63292893





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