[Zope3-Users] Creating utilities overhead
srichter at cosmos.phy.tufts.edu
Thu May 5 15:48:50 EDT 2005
On Tuesday 03 May 2005 09:18, Andreas Jung wrote:
> I have an utility registered as
> 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.
Right. Because the directive immediately instantiates the utility.
> 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?
Well, this is totally different. Here you register a factory called
"txng.lexicons.default", not a utility! So getUtility() will not work.
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-users