[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-dev
Subject: Re: [Zope-dev] More Beginner doubts
From: Dieter Maurer <dieter () handshake ! de>
Date: 2003-09-18 18:55:10
[Download RAW message or body]
Emiliano Marmonti wrote at 2003-9-17 22:51 -0300:
> Thanks Andrew, I'll try it.
> Now I'm testing inside Zope and everything looks well, except for:
>
> self.cat.addIndex('id','FieldIndex' )
> self.cat.addIndex('name' ,'FieldIndex' )
> self.cat.addIndex('observaciones','FieldIndex' )
> get_transaction().commit()
>
> Zope is telling me that from this version (2.6) I could not addIndex
> here, must be done outside(where?), in the Application (that I haven't).
> My problem is that I create the catalog inside the class
I have the feeling that you are working on a too low level.
In Zope, you would usually work with a "ZCatalog" instance
and not a "Catalog" instance.
ZCatalog's "addIndex" has the signature you expect.
"Catalog"'s "addIndex" has the signature "addIndex(name,indexObject)".
See at "ZCatalog.addIndex" code to find out how to convert
an index type into an index.
Dieter
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic