Previously Héctor Velarde wrote:
> well, this thing is really crazy...
>
> when I change my extender declaration to include both adapters I am
> getting a weird error:
>
> class NITFExtender(object):
> implements(ISchemaExtender, ISchemaModifier)
> adapts(IATNewsItem)
>
> this doesn't happens if I use implements(ISchemaExtender) or
> implements(ISchemaModifier), but only if I use both at the same time.
>
> 2008-01-03T20:20:49 ERROR Zope Could not import Products.nitf4plone
> Traceback (most recent call last):
> File "C:\Plone-2.5.5\Zope\lib\python\OFS\Application.py", line 708,
> in import_product
> product=__import__(pname, global_dict, global_dict, silly)
> File "C:\Plone-2.5.5\Data\Products\nitf4plone\__init__.py", line 10, in ?
> installExtenderGloballyIfLocallyIsNotSupported(NITFExtender,
> 'nitf4plone')
> File
> "C:\Plone-2.5.5\Data\Products\nitf4plone\extenderInstallation.py", line
> 20, in installExtenderGloballyIfLocallyIsNotSupported
> provideAdapter(extenderClass, name=name)
> File "C:\Plone-2.5.5\Zope\lib\python\zope\component\__init__.py",
> line 324, in provideAdapter
> raise TypeError("Missing 'provides' argument")
> TypeError: Missing 'provides' argument
That is by design: the zope configuration magic can not determine to
which interface your adapter is adapting since it implements two
interfaces. You need to define that explicitly in zcml for adapters that
implement multiple interfaces.
Wichert.
--
Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers