m_self of methods accessed via non trivial acquisition
My question regards the details of how the contents of m_self of an acquired method is calculated by the acquisition machinery. To illustrate this, I will depict an acquisition tree using the following symbols: O -- an acquisition wrapper <upcase letter> -- an acquitsition wrapper named for further reference [<lowercase letter>] -- an object -- -- the aq_parent link | -- the aq_self link I will use the following acquisition tree for illustration (it resembles the tree I have in my application, I just reduced it to make my point) A--O--[a] | | | [b] | O--B--O--[c] | | | | | [d] | | | O--[e] | | | [f] | [g] In this representation, the acquisition order is from bottom to top. The bottom most object is /A.aq_base/. Acquisition along containment only produces horizontal lines of acquisition wrappers. let /m/ be a method of the objekt /f/. The expression of interest is x := A.m I would expect /x.m_self/ to be an acquisition wrapper C C := A.f where (as far as i understand the rules of acquisition) /C.aq_parent == A/ But instead displaying /x.m_self/ yields the acquisition tree rooted at /B/ !! I find this a bit disturbing. My question: 'Is it a *bug* or a *feature*?'. I hope, I made my point clear. I hope someone can shed light on this subject, Stefan.
Stefan Bund wrote: I hope someone can shed light on this subject, I have a rule of thumb for getting a nag on aquisition that hasn't failed me yet. I see every objectmanager as a directory in an ordinary filesystem. Normally in a filesystem if it has the following layout:: a/ # directory m1 # file (attribute) b/ m2 c/ m3 d/ m4 e/ m5 f/ m6 then if I am in 'f' and I want to get to attribute m2 in 'b' i will write: 1) ../../../b/m2 if I want to get to attribute m3 in 'c' I will write: 2) ../../../b/c/m3 Attribute m4 in 'd' will be: 3) ../../m4 My concept of aquisition is a method that automagically appends the correct numbers of '../' untils it finds the first first occurence of the first directory for me :-) so if I want to do the three examples above via aquisition I would just write: 1) b/m2 or b.m2 (in dot notation) 2) b/c/m3 or b.c.m3 3) m4 Hope that helps. regards Max M
Hi, I am using the PHP Document to build a content management system, it seems like there is a serious caching issue which lets variables in the namespace, and though defined within other scripts. I've been busy with it the last few day's and it keeps getting back. I'll try it with a short example: I have made some documents here, please try this link first (this one may not output anything between the two <HR> as $text is not defined yet): http://zope.vizzzion.org/ioan/script.php it is precisely the same script as here: http://zope.vizzzion.org/ioan/text.php Here's the source of both, text.php and script.php: http://www.vizzzion.com/ioan/script.phps Here is a form where you can submit a varibale named text, try it and check the links above again: (this one uses POST) http://zope.vizzzion.org/ioan/ (this one uses GET) http://zope.vizzzion.org/ioan/get Do you have any idea how i can flush the namespace in a way that only variables which have indeed been defined (either by cookie, http request or directly within the script) are defined? Kind regards, Sebastian Kügler ______________________ www.vizZzion.com
participants (3)
-
Max M -
sebas ICK -
Stefan Bund