I used it to access objects which are placed several levels above the
current object in the tree. Avoiding parent.parent.parent...
constructs.
It's used in basewindow.lzx in a similar way:
<!--- Called onmousedown when this is the frontmost window to see if
the click should bring a different window to the front.
@keywords private -->
<method name="_checkmouse" args="v"> <![CDATA[
if (v == null || v == this) return;
// check if a modal dialog is frontmost
if (lz.ModeManager.hasMode( this )) return;
var foundwindow = v.searchParents('haswindowfocus');
if (foundwindow != null) {
foundwindow.setWindowFocus(true);
}
]]>
</method>
Another usage example from the forums:
http://forum.openlaszlo.org/showthread.php?t=5720
On Sun, Mar 6, 2011 at 2:29 PM, P T Withington <[email protected]> wrote:
> Not clear. Looks like I marked it private in r9179 as general doc cleanup.
> Probably I was being over-zealous.
>
> Can you give an example of how you used this? Internally, this is used
> mostly to inherit attribute values. The modern way to do that is to use CSS:
>
> <attribute name="foo" style="foo" inherit="true" />
>
> Will cause a node to inherit the CSS foo value from it's parent if it does
> not have one of its own. Are there other applications? If not, I am in
> favor of leaving this interface private.
>
> On 2011-03-06, at 07:36, Raju Bitter wrote:
>
>> The LzNode#searchParents() method doesn't show up in the
>> documentation, it's private now. What was the reason to make that
>> method private? I used it a lot in my apps.
>
>