ZPT - getting at an object's parent
How do I get at the attributes of an object's parent? I cannot use acquisition because the current object might have an attribute of the same name. T.
On Thu, 14 Mar 2002, Tom Nixon wrote:
How do I get at the attributes of an object's parent?
I cannot use acquisition because the current object might have an attribute of the same name.
to get property "spam" of the parent of object "foo": foo.aq_parent.spam -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
Joel Burton wrote:
On Thu, 14 Mar 2002, Tom Nixon wrote:
How do I get at the attributes of an object's parent?
to get property "spam" of the parent of object "foo":
foo.aq_parent.spam
Is it not good tone anymore to use: foo.PARENTS[1].spam ??? regards Max M
On Fri, 15 Mar 2002, Max M wrote:
Joel Burton wrote:
On Thu, 14 Mar 2002, Tom Nixon wrote:
How do I get at the attributes of an object's parent?
to get property "spam" of the parent of object "foo":
foo.aq_parent.spam
Is it not good tone anymore to use:
foo.PARENTS[1].spam ???
It never was. PARENTS[] is a list in the REQUEST object--you won't find it if you go looking through obj foo. PARENTS[] shows the parents of the current REQUEST obj, *not* the PARENTS[] of a selected object, like foo. -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant
participants (3)
-
Joel Burton -
Max M -
Tom Nixon