pointers in zope (newbie question)
hello, i need to have the same object at different places, more properly, i need to refer an object at different places, in different folders, of my zope application (i use formulator, and i would like that when i modify properties of the "same" field in different forms, all the others are updated) is it possible ? thanks thomas
--On 25. April 2006 19:17:11 +0200 thomas desvenain <thomas.desvenain@gmail.com> wrote:
hello,
i need to have the same object at different places, more properly, i need to refer an object at different places, in different folders, of my zope application
Look in the mailinglist archive (of the last weeks) for the thread "same object in different containers". -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
I've done a similar app where there's an archive of files (zope File objects) that I'm doing stuff with in another place. I happily used:: return self.unrestrictedTraverse(self.actual_path) in a class that looks something like this:: class VirtualFile(SimpleItem): def __init__(self, id, actual_path): self.id = id self.actual_path = actual_path def _get_actual_object(self): """ return the real object this refers to """ return self.unrestrictedTraverse(self.actual_path) def get_size(self): obj = self._get_actual_object() return obj.get_size() thomas desvenain wrote:
hello,
i need to have the same object at different places, more properly, i need to refer an object at different places, in different folders, of my zope application
(i use formulator, and i would like that when i modify properties of the "same" field in different forms, all the others are updated)
is it possible ?
thanks
thomas _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
participants (3)
-
Andreas Jung -
Peter Bengtsson -
thomas desvenain