Hi, I'm trying to override the traversal method of a product derived from Folder. It seems (from Chameleon) that this is possible by changing the __bobo_traverse__ method, though I'm not quite sure what I'm expected to return. Assuming I have a database like this: Folder1 myObject myProduct <nothing here> How can I make myProduct's __bobo_traverse__ return myObject? thanks, Jacob
----- Original Message ----- From: Jacob Gorm Hansen <jg@ioi.dk>
Assuming I have a database like this:
Folder1 myObject myProduct <nothing here>
How can I make myProduct's __bobo_traverse__ return myObject?
Is myObject a sibling of myProduct? You can return 'self.myObject' from __bobo_traverse__, but then it will just act like another copy of myObject and will be difficult to manage unless you do some contortions. What are the circumstances under which you want to do this? Why? Cheers, Evan @ 4-am
The tabs seem to have been deleted, I'll try posting with spaces instead: Folder1 myObject myProduct <nothing here> I've discovered that overriding tpValues makes it easy to manipulate the tree, but that does not make the objects reachable by the ORB as e.g. myProduct/myObject. Evan Simpson wrote:
Is myObject a sibling of myProduct? You can return 'self.myObject' from __bobo_traverse__, but then it will just act like another copy of myObject and will be difficult to manage unless you do some contortions.
What are the circumstances under which you want to do this? Why?
I need a reference subtree with a lot folders of text and sound in English (the Model), and a number of "virtual subtrees (Views) reflecting the same data, except in other languages. In this way I can assign different logins to translators world wide, and let them all manipulate the relevant aspects of the Model, as permitted by their personal View. I could do this without Zope, but I'd really like to try it out on something like this. Best, Jacob
participants (2)
-
Evan Simpson -
Jacob Gorm Hansen