On 11.05.2007, at 16:12, Chris Withers wrote:

Hi All,

I want to lookup a multi-adapter using the following code:

getMultiAdapter((obj1,obj2),ISomething)

I also wanted to have a "backstop" adapter so that the above would never fail, which I tried to register as follows:

<adapter
  for="* *"
  provides="ISomething"
  factory=".something.Something"/>

...however the getMultiAdapter call still failed with a ComponentLookupError :-(

I had to change the registration as follows:

<adapter
  for="* .module.BaseClassOfObj2"
  provides="ISomething"
  factory=".something.Something"/>

...to get the getMultiAdapter call to work.

Why do I need to do this?


well, i dunno too (maybe a zcml issue), but i thing if you use

<adapter
  for="zope.interface.Interface zope.interface.Interface"
  provides="ISomething"
  factory=".something.Something"/>

it schould work


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/bernd.dorn% 40lovelysystems.com


_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to