[Zope3-dev] Re: adapter registration question
Chris Withers
chris at simplistix.co.uk
Thu Nov 16 02:52:06 EST 2006
Jean-Marc Orliaguet wrote:
> once you have that utility / adapter you should be able to call it like:
>
> converter = getAdapterFor(123, type=IToStringConverter)
> strResult = converter.convert(123)
Not quite, what I'm looking to do is more along the lines of:
mystr = getAdapter(123,str)
(where "str" is the interface I'm looking for here)
> PS: calling '123' an adapter is really bending concepts.
Yes, this is a mistake, I believe this should always be referred to as
"the adapted value" or the suggestion Dieter made...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope3-dev
mailing list