Re: [Zope3-Users] view vs page confused

2007-03-28 Thread FB
Hi, On Tue, Mar 27, 2007 at 06:03:54PM +0200, Dominique Lederer wrote: [snip] so if i create a class which inherits from BrowserView, and then register it via zcml as browser:page, it becomes adaptes to IBrowserRequest an turns to a BrowserPage (via the on-the-fly created class)? so

[Zope3-Users] fine grained subscriber

2007-03-28 Thread Lorenzo Gil Sanchez
Hi, I'm writing an event subscriber to the IIntIdRemoveEvent event type. It looks like this: def intIdRemovedSubscriber(event): if IMyInterface.providedBy(event.object): # do some stuff with event.object and the zcml: subscriber handler=.intIdRemovedSubscriber

Re: [Zope3-Users] fine grained subscriber

2007-03-28 Thread FB
Hi, On Wed, Mar 28, 2007 at 12:16:23PM +0200, Lorenzo Gil Sanchez wrote: [snip] But I'd like to avoid the if clause inside my subscriber function by doing something similar to this: def intIdRemovedSubscriber(obj, event): # do some stuff with obj, which is garanteed to provide

[Zope3-Users] problems with catalog: indexing field from an objects adapter

2007-03-28 Thread Dominique Lederer
hi, I want to index a field from an object, which works perfectly via Catalog and Field Index. But if my callable field returns a value, which is returned from an adapter of the object, things get complicated for me: i create my object an add it to a container (not via zmi). i do the

Re: [Zope3-Users] fine grained subscriber

2007-03-28 Thread Lorenzo Gil Sanchez
El mié, 28-03-2007 a las 13:39 +0200, Lorenzo Gil Sanchez escribió: El mié, 28-03-2007 a las 12:50 +0200, FB escribió: You need a dispatcher - a quite common concept in zope3: [events.py, not tested] from zope.event import notify def removeIntId(event):

Re: [Zope3-Users] FieldIndex on boolean field - error

2007-03-28 Thread FB
Hi, On Wed, Mar 28, 2007 at 03:55:28PM +, Alek Kowalczyk wrote: Hi, I'm trying to index a boolean field of some object, to simplify retrieving all the objects which have some flag turned on. I am adding in proper place the index: catalog['anomaly'] = FieldIndex('anomaly', IMyObject)