Re: Getting the iid of a component for activation?



Michael Meeks <michael helixcode com> writes:

> Hi Archit,
> 
> On Fri, 1 Dec 2000, Archit Baweja wrote:
> > Well I made a very vanilla-container for embedding the
> > bonobo-calculator-control, just to started on some Bonobo Programming. 
> > Well I have a question (obviously). Well to activate (is this the
> > right term in the present context) the component, I need the iid.
> > Well, how do I get it without hardcoding it in my source file? Is
> > there some CORBA or OAF or Bonobo function which does this? Like give
> > it the control's name and it'll give me the full iid.
>  
>         For now you get to hardcode the IID including its massive
> number; but wait, a little bird taps on my shoulder.
>   
>         So; some people tell me that most apps have no new interfaces, so
> if you want to create a simple calculator app with a built in minesweeper
> game, you _have_ to hardcode the IID's unless you add magic new interfaces
> to query on.     

I still think that it's wrong to hardcode the IID - this would make it
impossible to replace the component by another minesweeper game.

>         This whole thing is laughable.

You seem to misunderstand what OAF is aimed for; if I remember correctly, one
reason for the gnorba->OAF migration was the fact that OAF supports queries
so that you do not have to hardcode anything (btw. if I remember correctly,
the other big reason was that OAF supports UUIDs so that we won't get any
namespace clashes ;-))

With OAF, you query for the _capability_ or a component and _not_ for its name.

So IMHO the correct thing to add an attribute to gnomine's oafinfo file and then
to do an oaf_query() for this attribute.

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




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