Re: bonobo comments/questions




> 1) When you have an object which supports interfaces A and B
>    (both derived from GNOME::Unknown), and you are inside
>    the implementation of a member function for A, there is no
>    way to get the GnomeObject structure for B:
> 
> 	impl_MODULE_Interface_function (PortableServer_Servant servant,
> 	CORBA_Environment *ev)
> 	{
> 	  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 */
> 	}

Well, you can go from the CORBA object to the servant, and from the
servant to the actual GnomeObject.

Of course, you could also keep track of what you are implementing.
Where are you planning on using this?

If you want, I can add a gnome_object_query_interface_xxx that would
return the GnomeObject.

> 2) Wouldn't it be a good idea to hide all CORBA from the user?  So 
>    there would be more -client.[ch] files which would encapsulate
>    more CORBA details, like query_interface (maybe even caching
>    results of previous query_interface calls in a list in
>    GnomeObjectClient?)

Well, it is not about hiding CORBA all over the place, Bonobo is a
framework that makes building this sort of applications easier.

Do you have specific examples of things you would like to hide?

> 3) There are several sources for the CORBA_Environment parameter
>    you pass with each CORBA call.
>      a) Create your own.
>      b) use one from a GnomeObject structure you have available.

this one is gone as it is broken.

>      c) in a impl_* call, use its ev parameter.
>    I haven't been able to deduct from the bonobo sources when
>    to use which. Could someone explain the advantages and
>    disadvantages of each?

In impl_ methods you use the *ev to return values, everywhere else you
have to allocate/release your own.



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