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
this method I use to install this on Plone 2.5 and it was provided to me
by Erik Rose:
def installExtenderGloballyIfLocallyIsNotSupported(extenderClass, name):
"""If we're on a version of Plone that doesn't support local
adapters, make it so merely putting the extender in the Products folder
activates it across on all Plone sites."""
if not localAdaptersAreSupported:
from zope.component import provideAdapter
provideAdapter(extenderClass, name=name)
Erik?
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers