Re: [Zope-dev] Events in the core

2004-12-12 Thread Dieter Maurer
Florent Guillaume wrote at 2004-12-10 19:02 +0100:
> 
>The two options we have are quite different:
>
>The model in Products/Event and Products/EventListenerTool is geared 
>toward local definition of listeners and rules for dispatch (if needed, 
>the tool could easily be divorced from CMF by the way).
>
>Zope 3's event model (and the Five backport) is first a global event 
>service, and global subscribers that may look in context-dependent 
>places for specific logic to dispatch events.
>
>So we have to chose. Jim added a comment in 
>http://dev.zope.org/Wikis/DevSite/Proposals/IncludeEventsInCore saying 
>(unsurprisingly) that he'd rather use the Zope 3 event system.

I fear that we also need to control the order in which subscribers
are notified:

  Consider for example the notification about the creation
  of a object. Both the catalog service and the workflow service need to
  be notified.

  If the catalog service is notified first, the workflow service must
  renotify the catalog service to get the workflow variables indexed.

-- 
Dieter
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


[Zope-dev] getUserById

2004-12-12 Thread Stefan H. Holek
In User.py the method is defined as
def getUserById(self, id, default=_marker):
try:
return self.getUser(id)
except:
if default is _marker: raise
return default
I am wondering whether anybody actually depends on the fact that 
getUser is supposed to raise an exception. I know of no user folder 
implementation that actually does that.

Rather, I'd like to change it to the way it's done in LDAPUserFolder 
where the method looks (more or less) like:

def getUserById(self, id, default=_marker):
user = self.getUser(id)
if user is None and default is not _marker:
return default
return user
Any objections?
Stefan
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )