pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: TreeView selection detection
Date Mon, 07 Jun 2010 12:00:08 GMT
You can override setSelectedPaths(). If your TreeView is multi-select, you should also override
addSelectedPath() and removeSelectedPath().

In event listener attributes, you can access the event arguments via an "arguments" array
that is passed to the function. 

On Jun 6, 2010, at 11:00 PM, aappddeevv wrote:

> I was looking to wire up some selection processing once my nodes in a TreeView are selected.
I noticed that there is a listener list for that that I can add a listener to but I did not
see anything easy to use such as a simple method I can override on the TreeView that is called
when the selection changes.
> Is it expected that even subclasses of the actual class have to add a bunch of boilerplate
listeners to the controls to track these types of events? Is there a default listener installed
that translates the listener methods into simple-to-override calls in the subclass?
> I saw the tutorial on event listener attributes, but it was not clear how I could simply,
without a lot of specification or script tags, invoke a method on my TreeView subclass with
the arguments of the listener so I could process the selection change event. What is in the
bindings if the inline script is executed and how to reference “this.”? How do I reference
the argument of the listener event e.g. the path that changed in this example?
> Essentially, I just want my subclass’s method onSelectionPathAdded(Path added) to be
called which mostly mirrors the listener.

View raw message