Shane Hathaway wrote:
Can you see any weirdities that might occur from having an object as an attribute of more than one object manager / folder?
The recursion problem, for one.
Hmmm, how much of Zope would need changing to use the visitor interface?
Also, if you change the object in one place, it will also get changed in the other, which may not be the expected behavior.
Nope, that's exactly the desired and expected behaviour :-) What about Zope's deleting machinery? The desired effect is similar to a refcount, the object only gets deleted when all references to it have been deleted...
You could also do soft links like this (I bet this actually works :-) ):
class SoftLink (SimpleItem): def __init__(self, path): self.path = path
def __of__(self, parent): ob = self.restrictedTraverse(self.path) return getattr(ob, 'aq_base', ob).__of__(parent)
... but once again, changes made in one place would cause changes in the other. And then there are security considerations: how should the security behave if two users with different roles want to access/change the object?
How does it work in Unix? (that seems to be a good baseline :-)
PS: Do you know the answer to my &dtml.url-; question I asked earlier?
I couldn't find your question. :-(
Urg.. it was on zope@zope.org, sorry :-S Basically, can you do &dtml.url-/folder/object/method; yet? cheers, Chris