Dan Korostelev wrote:
> 2009/3/9 Dieter Maurer <die...@handshake.de>:
>> Jacob Holm wrote at 2009-3-6 01:55 +0100:
>>> ...
>>> I added it while working for ZC two years ago. It was needed to support
>>> a use case where the context used for looking up the annotation was not
>>> necessarily the current site. I don't know if the use case is still
>>> relevant to ZC, but the pattern is still being used in e.g.
>>> zc.notification and zope.app.preference (where it was added by me at the
>>> time).
>> I expect that use cases like this (looking up objects in a foreign site
>> context) will be important for my current employer (if it continuous to
>> use Zope in the future).
> Thanks for comments. The functionality stayed and migrated to
> zope.principalannotation. It now even have a doctest. :-)

It's interesting, this use case sound pretty close to what I'm talking 
about in the very last part of this message:


ie: adapter context based on object traversal rather than notion of 
"current site".

Can someone confirm to me whether or not manually specifying the context 
as I have in the example above would work, or would I need to do:

 >>> adapter1 = getAdapter(a,ISomething,context=siteA)
 >>> adapter2 = getAdapter(b,ISomething,context=siteB)



Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to