[Zope3-Users] Can't rename objects
Florian Lindner
mailinglists at xgm.de
Tue Jan 16 15:05:59 EST 2007
Hello,
I have a container object to which I can add and remove object but can not
rename them. I suspet my I namechooser to be faulty:
from zope.app.container.interfaces import INameChooser
from zope.app.container.contained import NameChooser
class XGMNameChooser(NameChooser):
implements(INameChooser)
def chooseName(self, name, object):
if IAbbreviation.providedBy(object):
# my name choosing code
return n
else:
return super(XGMNameChooser, self).chooseName(name, object)
registered like that:
<adapter
for=".interfaces.IXGM"
provides="zope.app.container.interfaces.INameChooser"
factory=".xgm.XGMNameChooser"
/>
furthermore the objects interface implements:
IContainer, IContained, IPossibleSite, IAttributeAnnotatable,
IContainerNamesContainer.
the class itself:
BTreeContainer, SiteManagerContainer
What's wrong?
Thanks,
Florian
More information about the Zope3-users
mailing list