Squeezing an extra object onto the acquisition path.
Hi! Let's say I have this structure: /folderA/folderB /folderC/folderD /objectA Is there any way (maybe using __of__()) I can make this into /folderC/folderA/objectA as far as the acquisition path is conserned?
Erik Enge wrote:
Is there any way (maybe using __of__()) I can make this into
/folderC/folderA/objectA
as far as the acquisition path is conserned?
Yeah, you can do something like this: obj.aq_base.__of__(x.__of__(y.__of__(x))) ...to build any acquisition chain you want to. But trust me, you probabyl don't want to do this, find an alternative solution to your problem. cheers, Chris
[Chris Withers] | Yeah, you can do something like this: Thanks. | But trust me, you probabyl don't want to do this, find an | alternative solution to your problem. Just did. :-)
Erik Enge writes:
Let's say I have this structure:
/folderA/folderB /folderC/folderD /objectA
Is there any way (maybe using __of__()) I can make this into
/folderC/folderA/objectA
as far as the acquisition path is conserned? You may look at my "Mirroring Folder"
URL:http://www.dieter.handshake.de/pyprojects/zope/MFolder.html It does something similar. Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Erik Enge