Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-23 Thread Martijn Faassen
Johan Carlsson wrote: Anyone had any success with ZCatalog in Zope 3? Sure. I'm not sure what the problem is but I see you get a lot of replies. We (Infrae) certainly got it working without having to patch anything. Um, the setup code we use it something like: def

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-23 Thread Johan Carlsson
Martijn Faassen wrote: Johan Carlsson wrote: Anyone had any success with ZCatalog in Zope 3? Sure. I'm not sure what the problem is but I see you get a lot of replies. We (Infrae) certainly got it working without having to patch anything. Um, the setup code we use it something like:

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-21 Thread Dominik Huber
Johan Carlsson wrote: Right after that I do this: catalog = Catalog() for index_name, index_attribute, idx_if, attr_call, index_type in indexes: idx = index_type(index_attribute, idx_if, attr_call) catalog[index_name] = idx

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-21 Thread Johan Carlsson
Dominik Huber wrote: Johan Carlsson wrote: Right after that I do this: catalog = Catalog() for index_name, index_attribute, idx_if, attr_call, index_type in indexes: idx = index_type(index_attribute, idx_if, attr_call) catalog[index_name] =

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-18 Thread Johan Carlsson
Hi again, The ComponentLookupError have re appeared! Error type: zope.component.interfaces.ComponentLookupError Error object: (InterfaceClass zope.app.intid.interfaces.IIntIds, '') What happend was that I had a IntId utitlity in the root site (renamed to '') that answered the request when I

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-18 Thread Johan Carlsson
Johan Carlsson wrote: Hi again, The ComponentLookupError have re appeared! Error type: zope.component.interfaces.ComponentLookupError Error object: (InterfaceClass zope.app.intid.interfaces.IIntIds, '') What happend was that I had a IntId utitlity in the root site (renamed to '') that

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-18 Thread Johan Carlsson
Johan Carlsson wrote: Dominik Huber wrote: Johan Carlsson wrote: I've tried this, it doesn't remove the NotYet problem though!?? Our framework relies on that concept and it is still working ;) Did you assert to add the catalog to the sitemanagement folder before adding its indexes? I

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Johan Carlsson wrote: Anyone had any success with ZCatalog in Zope 3? I'm trying to add indexes to the catalog but I get an ComponentLookupError: Error type: zope.component.interfaces.ComponentLookupError Error object: (InterfaceClass zope.app.intid.interfaces.IIntIds, '') I'm not sure how

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Ivo van der Wijk
On 11/17/05, Johan Carlsson [EMAIL PROTECTED] wrote: Anyone had any success with ZCatalog in Zope 3? I'm trying to add indexes to the catalog but I get an ComponentLookupError: Error type: zope.component.interfaces.ComponentLookupError Error object: (InterfaceClass

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Ivo van der Wijk wrote: On 11/17/05, Johan Carlsson [EMAIL PROTECTED] wrote: Anyone had any success with ZCatalog in Zope 3? I'm trying to add indexes to the catalog but I get an ComponentLookupError: Error type: zope.component.interfaces.ComponentLookupError Error object: (InterfaceClass

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Ivo van der Wijk wrote: On 11/17/05, Johan Carlsson [EMAIL PROTECTED] wrote: Anyone had any success with ZCatalog in Zope 3? I'm trying to add indexes to the catalog but I get an ComponentLookupError: Error type: zope.component.interfaces.ComponentLookupError Error object: (InterfaceClass

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
And thanks both of you for really fast replies :-) Johan -- Johan Carlsson Tel: + 46 8 31 24 94 Colliberty Mob: + 46 70 558 25 24 Torsgatan 72Email: [EMAIL PROTECTED] SE-113 37 STOCKHOLM ___ Zope3-users mailing list

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Ivo van der Wijk
On 11/17/05, Johan Carlsson [EMAIL PROTECTED] wrote: The code you gave me shows the same showed the same problem as Jürgen pointied out, the IntId needs to have '' as id. I remember having some real issues with IntId / Catalog, I doubt if they ever really got fixed. Check the patch in

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Ivo van der Wijk wrote: On 11/17/05, Johan Carlsson [EMAIL PROTECTED] wrote: The code you gave me shows the same showed the same problem as Jürgen pointied out, the IntId needs to have '' as id. I remember having some real issues with IntId / Catalog, I doubt if they ever really got fixed.

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Gary Poster
On Nov 17, 2005, at 9:05 AM, Johan Carlsson wrote: Johan Carlsson wrote: Ivo van der Wijk wrote: On 11/17/05, Johan Carlsson [EMAIL PROTECTED] wrote: The code you gave me shows the same showed the same problem as Jürgen pointied out, the IntId needs to have '' as id. I remember

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Gary Poster wrote: Hm. A very quick look at the patch concerns me a bit. Am I right that, if you apply the patch, then requests that are currently raising a NotYet for you will instead silently fail, not cataloging what you requested? That seems undesirable to me. I'd prefer the

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Dominik Huber wrote: Hi Johan Your problem is that the catalog is not locatable itself during the addition of its indexes (- state within the create and add method), therefore the location of the indexes cannot be located and the NotYetError is raised. You can move your code to an

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Dominik Huber wrote: Hi Johan Your problem is that the catalog is not locatable itself during the addition of its indexes (- state within the create and add method), therefore the location of the indexes cannot be located and the NotYetError is raised. You can move your code to an

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Johan Carlsson
Dominik Huber wrote: Johan Carlsson wrote: I've tried this, it doesn't remove the NotYet problem though!?? Our framework relies on that concept and it is still working ;) Did you assert to add the catalog to the sitemanagement folder before adding its indexes? I found the error, in the

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-17 Thread Tom Dossis
Dominik Huber wrote: subscriber for=.IYourObject zope.app.container.interfaces.IObjectAddedEvent handler=.addCatalogAndIndex / handler pseudo code: def addCatalogAndIndex(obj, event): sm = zapi.getNextSiteManager(obj) catalog = Catalog() addLocalUtility(sm, 'XY',