Re: moniker question



> I have some problems to fully understand the moniker concept: There are
> some
> examples in doc/Monikers:
> 
> file:quake-scores.gnumeric!January!Winner
>      This represents the cell whose name is
>      "Winner" in the January sheet in the
>      quake-scores.gnumeric workbook.
> 
> This means that the I must have a January and Winner moniker installed
> on the system? Isn't there a simpler way? Or do I miss something.

You are missing something.  Let me explain.

The first part "file.quake-scores.gnumeric" will be parsed by the file
moniker, and that will launch Gnumeric (from the mime type).  At this
point, the '!' will trigger the rest of the string to be parsed by the
`Item Moniker'.  So after the full string is parsed we end up with:

	File moniker		Item		Item 
	quake-scores.gnumeric	January		Winner

Now, lets say you resolve this interface against the "Stream"
interface.  The "January" and "Winner" objects are resolved using the
ItemContainer resolving rules.

Item moniker resolver is very simple, it queries its parent for the
"Bonobo::ItemContainer" interface, and it invokes the `getObject'
method on the interface to retrieve the object.

So in the Gnumeric case (impl detail: this used to be implemented for
embedded sheet objects, and it is not currently implemented for
sheets/cell names) January would be resolved by the Workbook, and
Winner would be resolved by the Sheet interface.

Best wishes,
Miguel.




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