Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-23 Thread Chris Withers
Jacob Holm wrote: 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) In general, using

Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-23 Thread Jacob Holm
Chris Withers wrote: Jacob Holm wrote: 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) In

Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-13 Thread Chris Withers
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

Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-13 Thread Jacob Holm
Chris Withers wrote: [snip] It's interesting, this use case sound pretty close to what I'm talking about in the very last part of this message: http://mail.zope.org/pipermail/zope-dev/2009-March/035220.html ie: adapter context based on object traversal rather than notion of current site.

Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-09 Thread Dieter Maurer
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

Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-09 Thread Dan Korostelev
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

[Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-05 Thread Dan Korostelev
Hi there! While looking at the zope.app.principalannotation package, I discovered that both zope.annotation and zope.app.principalannotation register their IAnnotations adapters twice: fisrt, as a simple adapter and second, as a multi adapter for some additional context object. The

Re: [Zope-dev] Question: additional context for IAnnotations adapter?

2009-03-05 Thread Jacob Holm
Hi Dan Dan Korostelev wrote: Hi there! While looking at the zope.app.principalannotation package, I discovered that both zope.annotation and zope.app.principalannotation register their IAnnotations adapters twice: fisrt, as a simple adapter and second, as a multi adapter for some additional