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
Using $this->owner - wrong or right?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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...
looks slightly like http://trac.pradosoft.com/prado/browser ... ebControls, even down to the naming...
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.
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.
There are 10 types of people in this world, those who understand binary and those who don't