[Zope3-dev] Question and maybe enhancement of theHomeFolderManager
Roger Ineichen
dev at projekt01.ch
Thu Apr 21 17:11:20 EDT 2005
From: zope3-dev-bounces+dev=projekt01.ch at zope.org
> [mailto:zope3-dev-bounces+dev=projekt01.ch at zope.org] On
> Behalf Of Florian Lindner
> Sent: Thursday, April 21, 2005 10:18 PM
> To: Stephan Richter; zope3-dev at zope.org
> Subject: Re: [Zope3-dev] Question and maybe enhancement of
> theHomeFolderManager
>
[snip]
> I've started to fork you Homefolder Manager and get a
> conflicting error:
>
> zope.configuration.config.ConfigurationConflictError: Conflicting
> configuration actions
> For: ('utility', <InterfaceClass
> zope.app.component.browser.tools.IToolConfiguration>,
> 'IHomeFolderManager')
> File
> "/home/florian/Desktop/zope/lib/python/CS/Homefolder/configure.zcml",
> line 74.2-78.8
> <browser:tool
> interface="CS.Homefolder.interfaces.IHomeFolderManager"
> title="CS Home Folder Manager"
> description="A CS customized version of the Home
> Folder Manager"
> />
> File
> "/home/florian/Zope3/src/zope/app/homefolder/configure.zcml", line
> 74.2-78.8
> <browser:tool
> interface=".interfaces.IHomeFolderManager"
> title="Home Folder Manager"
> description="A Principal Home Folder Manager"
> />
>
>
> Why do they conflict? The interface is different, only the
> last part is equal?
Ups, that's the problem. Only the interface class name is used
as the name for the named utility.
See zope.app.component.browser.metaconfigure.py
def tool(_context, interface, title, description=None,
folder="tools", unique=False):
name = interface.getName()
^^^^^^^^^^^^^^^^^^^^^^^^^^
permission = 'zope.ManageContent'
tool = ToolConfiguration(interface, title, description, unique)
ifaceDirective(_context, interface, IToolType)
utility(_context, IToolConfiguration, tool,
permission=permission, name=name)
I don't know if this is good or bad. But it seams to be a problem
in your case.
Hm, another question is, will the tool concept stay as the deault
registration concept or do we refactor this part a second time.
I think Stephan did a great job with the blow-service-branch work.
But I think this was not the last changes. Right now we have a
little mess in the registration concept, because the zope.app.authentication
use a much more implicit registration then other utilities.
This ends in a unusable "tool" registration for the authentication utility.
I recomend to use another name for your interface class name right now.
And propose a second iteration on the registration concept after
the release 3.1.
Regards
Roger Ineichen
> Thx,
>
> Florian
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub:
> http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
>
>
More information about the Zope3-dev
mailing list