Re: bonobo comments/questions



Martijn van Beers <sauron@charm.il.fontys.nl> writes:

> On Thu, Oct 07, 1999 at 10:04:32AM -0500, Miguel de Icaza wrote:
> > Well, you can go from the CORBA object to the servant, and from the
> > servant to the actual GnomeObject.
> How would I do the first step?

well, the original pb was this, no ?

> 	{
> 	  GNOME_Object MODULE_OtherInterface oi;
> 	  ModuleOtherInterface *goi;
> 	  GnomeObject *object = gnome_object_from_servant (servant);
> 
> 	  oi = gnome_object_query_interface (object,
> 						       "IDL:MODULE/OtherInterface");
> 
> 	  /* PROBLEM: how to get the goi with the instance-specific data */

If i understood, you wanted to get the CORBA_Object of your GNOME_Object oi ?
Well, it is possible to use gnome_object_to_servant on oi and 
PortableServer_Servant_servant_to_object
to get the CORBA_Object from you GnomeObject...

But Miguel's answer seems to be the other way: he has the CORBA_Object and 
assumes you want the corresponding GnomeObject. Is that what you really 
wanted ?
If so, the way is to do: PortableServer_Servant_object_to_servant on your 
CORBA_Object and then use gnome_object_from_servant
However, last time i tried to use this function it was not implemented
by ORBit.

Have i answered your question ? or am i completely wrong ?

Mathieu



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