[Zope3-dev] wildcard adapter
Martin Aspeli
optilude at gmx.net
Wed Jan 17 09:37:52 EST 2007
Chris Withers wrote:
>
> Hi All,
>
> I was wondering if someone could give me a definitive explanation of
> what the following means:
>
> <adapter
> for="* ISomething *"
> ...
>
> ...means?
>
> Is the following equivalent:
>
> provideAdapter(...,adapts=(None,ISomething,None),...)
>
No, but this is:
provideAdapter(...,adapts=(Interface, ISomething, Interface),...)
> If it is, then which of the following should I use to register a generic
> adapter for any single object to an interface:
>
> provideAdapter(...,adapts=(None,),...)
> provideAdapter(...,adapts=None,...)
>
> I'm not having a lot of joy registering generic adapters so I thought
> I'd come and check my understanding here ;-)
>
provideAdapter(adapts=(Interface,), ...)
Martin
--
View this message in context: http://www.nabble.com/wildcard-adapter-tf3027563.html#a8411297
Sent from the Zope3 - dev mailing list archive at Nabble.com.
More information about the Zope3-dev
mailing list