Sorry. I
was thinking that the children extend the parent. super won’t work
in this case. The terms parent/child threw me off a little J
From: Arnett, Matt
Sent: Friday, August 17, 2007 3:19
PM
To: 'Rich Schramm';
users@xxxxxxxxxx
Subject: RE: [cinjug-users]
Calling methods of sibling objects
http://www.faqs.org/docs/javap/c5/s5.html
super.child1.method1();
From: Rich Schramm [mailto:richard.schramm@xxxxxxxxxxxxxxxxxx]
Sent: Friday, August 17, 2007 3:01
PM
To: users@xxxxxxxxxx
Subject: [cinjug-users] Calling
methods of sibling objects
Hi,
Hoping this is not a dumb question, maybe someone call help.
The object model for my application contains a parent object
(Parent) that has two other objects as properties (child1 and child2). In
child1, there is a method (method1) that I want to call from child2.
However, I am stumped on how to get a handle to child1 or even the parent from
within child2 without having to pass a reference to child2 from a method in
parent. Is there a way to call parent.child1.method1() from within
parent.child2?
Thanks,
Richard Schramm
Supply Dynamics, LLC.
513.965.2000 x14 (office)
513.300.7851 (mobile)
http://www.supplydynamics.com/