Page 2 of 2

Posted: Fri Sep 07, 2007 7:27 pm
by Christopher
I would say:

1. When building a structure of linked objects, like a tree, where the parent link is essential

2. When you (really) cannot solve the given problem using normally separated concerns

Posted: Sat Sep 08, 2007 1:54 am
by wei
i think you are building a control hierachcy (e.g, a tree), so use the standard naming, parent/child. You may want to create also a container/containee relationship for logical containments (such as, requirement of TInput to be within a TForm).

looks slightly like http://trac.pradosoft.com/prado/browser ... ebControls, even down to the naming...

Posted: Sat Sep 08, 2007 2:07 am
by wei
for event propagation, there are 3 types that may be considered. 1) bubble the event from root to destinated node. 2) bubble from node to root. 3) trigger event on the node only. all 3 have their uses: 1) the node can reactive to changes in the parents/containers, 2) the events can be handled in containing/parent nodes. 3) usually also used in combination with 1 and/or 2.

Posted: Thu Sep 20, 2007 4:20 pm
by VladSun
Hm ... any comments regarding this: http://www.w3.org/TR/DOM-Level-2-HTML/h ... ID-6043025. We have $this->owner structure in W3C standards.
form of type HTMLFormElement, readonly
Returns the FORM element containing this control. Returns null if this control is not within the context of a form.