Gary Poster wrote:

On Sep 28, 2005, at 1:53 AM, Tom Dossis wrote:

I can add a tool which is a simple subclass of Catalog.
However if I try to add some index(es) in the constructor it fails with a NotYet error (see below).

Is there a simple way to achieve this?

Yes. Don't add the indexes with the constructor. Add the catalog as a full utility first, as I described in my previous email, then start adding indexes.

An interesting observation ..

1. Adding content into a container in the constructor does work...
2. Adding a Unique Id Utility will stop it working (NotYet error).

class Contained(Persistent):

class Container(BTreeContainer):
    def __init__(self):
        super(Container, self).__init__()
        self[u'small'] = Contained()
        self[u'medium'] = Contained()
        self[u'large'] = Contained()

Should this pattern be considered taboo in z3?

Zope3-users mailing list

Reply via email to