[Zope3-dev] adapter lookup question

Chris Withers chris at simplistix.co.uk
Fri May 11 10:12:13 EDT 2007


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?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-dev mailing list