Re: bonobo_control_set_property question



Michael Meeks wrote:
Hi Dietmar,

On Thu, 5 Jul 2001, Dietmar Maurer wrote:
> Maybe I should use the PropertyBag set with
> bonobo_control_set_properties instead of aggregating one (Michael)?
> Why don't we simply aggregate a PropertyBag with a control instead of
> using bonobo_control_set_properties()?

        No idea. One should use set_properties instead of aggregating,
otherwise things will get screwed up - of course, you can aggregate as
well if you wish.

        Why we did it this way ? - no idea, historical thing.

The whole issue is a bit confusing.

1.) I would suggest that we do not use a property bag to get the title for a Control inside a PropertyControl. Instead we can extend the PropertyControl interface with a method:

string getTitle (in long pagenum);
That seems to be much easier to implement, and it is also more obvious for new users than getting the title form the associated property bag.

2.) The method naming is a bit confusing: I would replace bonobo_control_[set|get]_properties() with bonobo_control_[set|get]_property_bag()

3.) I found one reason why we cant aggregate the PropertyBag: A convenient way to get a PropertyBag for a control is to use bonobo config:

pb = bonobo_get_object ("config:/path/to/settings", "Bonobo/PropertyBag");

Which results in a CORBA object reference to a PropertyBag, and we cant aggregate CORBA object references. That is why we changed:

bonobo_control_set_properties (BonoboControl *control, BonoboPropertyBag *pb);
to (in Gnome 2):
bonobo_control_set_properties (BonoboControl *control, Bonobo_PropertyBag pb);
in order to set an arbitrary CORBA Bonobo_PropertyBag.

- Dietmar



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