> I tried both
>    my_catalog = Catalog(GlobbingLexicon())
> and
>    my_catalog = Catalog(Vocabulary(globbing=1))
> and neither resulted in any calls to any GlobbingLexicon methods!
>      Richard

Catalog doesn't take the Vocabulary object itself as an argument. It
takes the (string) id of an acquirable Vocabulary. If you don't specify
a string, it creates a standard non-globbing lexicon (Although a
ZCatalog creates a globbing lexicon, go figure). Something like this
should work (Assuming your product is an acquisition wrapper e.g. by
subclassing Acquisition.Implicit):

my_vocab = Vocabulary(globbing=1)
my_cat = Catalog(vocabulary='my_vocab')

I'm completely unsure why it was implemented this way. I can kinda
understand for ZCatalog, but not really for Catalog. Anyone care to

or you could do this without using acquistion, but you wind up creating
the vocabulary twice:

my_cat = Catalog()
my_cat.lexicon = Vocabulary(globbing=1)

| Casey Duncan
| Kaivo, Inc.

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to