Re: GNOME::Container::get_object




> i just cannot understand what the GNOME::Container::get_object interface is 
> used for. The only place it was used was in gnome-object-client.c, 
> gnome_object_activate function.

This function is used during moniker resolution time.

Monikers basically are a way of naming sub-objects, the toplevel
moniker is always a GOAD-ID plus a file name (and this is looked up in
the name service, although no App does this yet).

Then for every remaining element of the moniker, get_object is invoked
in the resulting object until you finish the moniker.

Think of monikers as a path to an object, and of get_object as the way
to access one element of the path.

> what use is it to get the CORBA_Object reference of a componnent ?

you get a CORBA_Object reference of a *sub* component.

For example, for linking to page4 of a pdf document, you could use:

    xpdf_1_0,/home/miguel/corba.pdf,page=4

To reference the sales in a spreadsheet:

    Gnumeric,/home/miguel/sales.gnumeric,Sheet1,YearlySales

> can it be used to save us from launching a component for a new document when 
> the component was allready launched ? If so, how can we know that a container 
> allready has this component ? 

Moniker resolution depens on this (see the code), but so far nobody is
registering its open documents yet (but we should do this).

> Anyway, the NameService would do a better job for this.

We use the name service (moniker resolution does it).

Best wishes,
miguel.



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