[Zope-dev] using the monitor - anyone have any tips???
Jeff K. Hoffman
jeff.hoffman@goingv.com
Tue, 29 Feb 2000 17:40:57 -0500 (EST)
On Tue, 29 Feb 2000, Damian Morton wrote:
> I can quite happily traverse the object and its inheritance tree using
> obj.__dict__ and obj.__class__.__dict__ and obj.__class__.__bases__ and
> such, but there seem to be a whole bunch of attributes and methods available
> for objects that I can only guess at. I assume they are acquired rather than
> inherited. Not being really familiar with acquisition (even after reading
> all the available docs), any tips on how best to traverse the acquisition
> path on my search for attributes and methods would be greatly appreciated.
For a number of reasons, what you are wanting to do is not feasible. ANY
object beneath the root of the ZODB can be acquired by ANY other object
beneath the root of the ZODB. For instance, given the hierarchy:
- root
- foo
- index_html
- bar
- test_html
The following URLs are valid:
/foo/index_html
/bar/test_html
/foo/bar/test_html
/foo/bar/index_html
/bar/foo/index_html
/bar/foo/test_html
/foo/bar/foo/index_html
...
It is very hard to come at Zope and say, "Show me all of the possible
methods I could apply on this object through acquisition." It is quite
easy, though, to say, "Can I call this method on this object, through
natural means or through acquisition?"
If you haven't read Jim's "Acquisition Algebra" talk from IPC8, I highly
recommend you do so. It is located here:
http://www.zope.org/Members/jim/Info/IPC8/AcquisitionAlgebra/index.html
Hope this helps.
--Jeff
---
Jeff K. Hoffman 704.849.0731 x108
Chief Technology Officer mailto:jeff@goingv.com
Going Virtual, L.L.C. http://www.goingv.com/