[Zope] Vocabularies and DateRangeIndexes

Paavo Parkkinen pparkkin@cc.jyu.fi
Thu, 3 Apr 2003 14:49:03 +0300


On Thu, 03.04.2003 at 13:39 +0200, Andreas Jung wrote:
> Checkout the method that is called from with the corresponding ZMI screen.
> 
> --On Donnerstag, 3. April 2003 14:31 Uhr +0300 Paavo Parkkinen 
> <pparkkin@cc.jyu.fi> wrote:
> 
> > How do I add a vocabulary to a catalog so that the singlechars option
> > is set, from a python script? It needs the extra.splitterSingleChars
> > set, but I have no idea how to do that.

This is the method called:

---
def manage_addVocabulary(self, id, title, globbing=None, extra=None,
                         splitter='', REQUEST=None):
...
    c=Vocabulary(id, title, globbing,splitter,extra)
...
---

The Vocabulary-class contructor contains these lines:

---
        if not extra:
            extra = _extra()
            extra.splitterIndexNumbers = 0
            extra.splitterSingleChars  = 0
            extra.splitterCasefolding  = 1
---

So I'm guessing I need to pass manage_addVocabulary the extra
parameter and have that contain splitterSingleChars (= 1). But I have no
idea how to do that. I can't create _extra class instances inside a
python script (because of the '_').

-- 
paavo.
  wu wei er wu bu wei