[Zope3-Users] Creating utilities overhead
Andreas Jung
lists at andreas-jung.com
Tue May 3 09:18:00 EDT 2005
Hi,
I have an utility registered as
<utility
provides="textindexng.interfaces.ILexicon"
factory="textindexng.lexicon.LexiconFactory"
name="txng.lexicons.default"
/>
trying to create a new Lexicon instance through
lexicon zapi.createObject(None, 'txng.lexicons.default')
does not work (Zope 2.8, Five) because the factory does not seem
to be registered for IFactory.
Adding
<utility
provides="zope.component.interfaces.IFactory"
component="textindexng.lexicon.LexionFactory"
name="txng.lexicons.default"
/>
resolves the issue. But why is the explicit declaration of the factory
necessary? IMO the first declaration implies the second one. So this
looks like configuration overhead to me...thoughts?
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20050503/a9da4a90/attachment.bin
More information about the Zope3-users
mailing list