I thought this what ContractIDs and the nsCategoryManager was for?
Instead of looking up particular spellchecker implementations by CID, I
simply ask the CategoryManager to enumerate all the components that
implement the Contract ID "@mozilla.org/spellchecker;1" if it returns
one or more components, I know that they implement nsISpellChecker.
--== Kin ==--
Marco Bosch wrote:
> I was thinking more along the lines of Mozilla defining
> for instance a spellchecker interface. Just some interface
> in which you supply a target language and a word and
> the spellchecker will return a list of recommended
> substitutions if it doesn't know the word. Now, if I would
> write a component and I would need a spellchecker,
> I would like to ask the componentmanager if there is
> *any* class implementing that interface. And if so,
> just use the first one available.
> The user could than quite easily remove a certain
> implementation of the spellchecker for another one, without
> me having to put all possible CIDs that could implement
> this interface into my component and check if any of these
> CIDs is available. (And hoping that after I publish my
> component no new spellcheckers come available).
>
> I hope this clarifies my question.
> (BTW: it is only an example)
>
> Greetings,
>
> Marco Bosch
>
>