[Zope3-Users] Can't rename objects
Christian Theune
ct at gocept.com
Tue Jan 16 16:15:46 EST 2007
Do you have a specific exception with traceback that prevents you from
renaming?
Christian
Am Dienstag, den 16.01.2007, 21:05 +0100 schrieb Florian Lindner:
> 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
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
--
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20070116/76f76d88/attachment.bin
More information about the Zope3-users
mailing list