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

2005-11-23 Thread Martijn Faassen
Johan Carlsson wrote: Martijn Faassen wrote: [snip] Does you code for adding catalogs and adding fields get called in the same request? Yes, it's done when an application root is installed. Regards, Martijn ___ Zope3-users mailing list Zope3-users

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: de

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 _registerUtility(context

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] = idx

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 tools['catalo

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 f

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: (, '') What happend was that I had a IntId utitlity in the root site (renamed to '') that answered the request when I added the Indexes in

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: (, '') What happend was that I had a IntId utitlity in the root site (renamed to '') that answered the request when I added the Indexes in a sub site. So the ques

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

2005-11-17 Thread Tom Dossis
Dominik Huber wrote: handler pseudo code: def addCatalogAndIndex(obj, event): sm = zapi.getNextSiteManager(obj) catalog = Catalog() addLocalUtility(sm, 'XY', ICatalog, catalog) catalog[name] = Index(name, IAnyInterface) Regards, Dominik From the apidoc for IWriteContainer.__s

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 Dominik Huber
Johan Carlsson wrote: 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 yo

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 ObjectAdde

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 ObjectAdde

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

2005-11-17 Thread Dominik Huber
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 ObjectAddedEvent-subscriber for

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 excep

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 hav

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

2005-11-17 Thread Johan Carlsson
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 having some real issues with IntId / Catalog, I doubt if t

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 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 INS

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 Zo

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: (, '') I'm not s

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: (, '') I'm not s

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: (, '') > > I'm not sure how to

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: (, '') I'm not sure how to setup the IntIds utility, what I've done so far

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

2005-11-17 Thread Johan Carlsson
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: (, '') I'm not sure how to setup the IntIds utility, what I've done so far is just add one and gi