[Zope3-dev] possible bug in catalog code

2005-07-07 Thread Martijn Faassen
Hi there, in zope.app.catalog.attribute, there's the following functionality: def index_doc(self, docid, object): if self.interface is not None: object = self.interface(object, None) if object is None: return None value =

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Hi there, in zope.app.catalog.attribute, there's the following functionality: def index_doc(self, docid, object): if self.interface is not None: object = self.interface(object, None) if object is None: return None

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Jim Fulton wrote: [snip] It would only be safe to use None as a BTree key if all of the keys used were None, which wouldn't be very interesting. :) It'd also make sense if you didn't do a range query, right? I.e. you're just looking for (None, None). I realize though

[Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Martijn Faassen
Hi there, We just noticed that some objects were not being cataloged correctly. After a lot of debugging, we noticed the following: The IntId utility wouldn't find the unique id for an object when a modified event was sent. As a result, it wasn't being indexed. We figured out that there

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Hi there, We just noticed that some objects were not being cataloged correctly. After a lot of debugging, we noticed the following: The IntId utility wouldn't find the unique id for an object when a modified event was sent. As a result, it wasn't being indexed. We

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Jim Fulton wrote: ... - Implement ILocation in your content objects. This is the simplest course. It sounds like, for your application, the content objects should know about their locations, since you want them to be able to generate events that contain location

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Roger Ineichen wrote: Hi Martijn and Jim Behalf Of Martijn Faassen Sent: Thursday, July 07, 2005 2:22 PM To: zope3-dev (E-mail) Subject: [Zope3-dev] interaction between LocationProxy and IIntId utility Hi there, [..] Finally with some help from Stephan Richter giving us the clue that

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Benji York
Jim Fulton wrote: We don't want to *require* objects to provide ILocation. I don't know what the right answer is here. I'll think about it. I'd love some good suggestions. Perhaps an ILocation adapter that would keep the __name__ and __parent__ information in a separate place (attribute

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Dieter Maurer
Jim Fulton wrote at 2005-7-7 06:55 -0400: ... [Martijn] The following sequence I think leads to trouble: value = getattr(object, self.field_name, None) if value is None: return None as this means attributes that do exist and have the value None would never

Re: [Zope3-dev] small problem in zc.page?

2005-07-07 Thread Martijn Faassen
Jim Fulton wrote: Martijn Faassen wrote: Christian Theune wrote: [snip] I'm actually interested in what the plans/needs for zc.page are to move into core. Maybe I/we can spend some time on bug fixing ... Even if not in the core, it'd already help if this wasn't a one-time snapshot but a

[Zope3-dev] Re: interaction between LocationProxy and IIntId utility

2005-07-07 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: Martijn Faassen wrote: Jim Fulton wrote: ... - Implement ILocation in your content objects. This is the simplest course. It sounds like, for your application, the content objects should know about their locations, since