logo       

Intids missing adapter declarations?: msg#00095

web.zope.z3base.five

Subject: Intids missing adapter declarations?



Hi,

I had to add this to my configure.zcml file to get IntIds running:

<adapter
for="persistent.interfaces.IPersistent"
provides="zope.app.keyreference.interfaces.IKeyReference"
factory="zope.app.keyreference.persistent.KeyReferenceToPersistent"
trusted="y"
/>

<class class="zope.app.keyreference.persistent.KeyReferenceToPersistent">
<require permission="zope.Public"
interface="zope.app.keyreference.interfaces.IKeyReference" />
</class>

<adapter
for="persistent.interfaces.IPersistent"
provides="ZODB.interfaces.IConnection"
factory="zope.app.keyreference.persistent.connectionOfPersistent"
/>

Otherwise I'd get:

File "/home/jmo/philikon-local-components/lib/python/zope/app/intid/__init__.py", line 110, in register
key = IKeyReference(ob)
File "/home/jmo/philikon-local-components/lib/python/zope/interface/interface.py", line 691, in __call__
raise TypeError("Could not adapt", obj, self)
TypeError: ('Could not adapt', Theme('A theme'), <InterfaceClass zope.app.keyreference.interfaces.IKeyReference>)


ref: http://svn.z3lab.org/trac/z3lab/file/CPSSkins4Five/trunk/configure.zcml

cheers
/JM


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise