You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by anton dos santos <ad...@free.fr> on 2011/03/16 21:38:19 UTC

TreeView & TreeViewSelectionListener

Hi
I have a TreeView with a TreeViewSelectionListener, but the listener doesn't get invoked when a item 
is removed from the tree.
I do : tree.getTreeData().remove( tree.getSelectedNode());
tree is refreshed : the removed node is no longer shown, no node is selected but the listener is not 
invoked.
Am I missing something ?
ps: The same strategy works fine with ListView.

Regards
Anton

Re: TreeView & TreeViewSelectionListener

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
yesterday I've started to look at this issue (
https://issues.apache.org/jira/browse/PIVOT-718 ).
I'm sorry, I know Pivot Trees very little ... so before doing anything
I'd like to better understand if I have found a deeper problem than
the original one of the ticket (and I hope no :-) ).

So, if someone has more knowledge of this problem, tell me or write
here, or better in the ticket (so whe have a single place for all
infos).

Thank you to all.

Bye,
Sandro

Re: TreeView & TreeViewSelectionListener

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
yesterday I've started to look at this issue (
https://issues.apache.org/jira/browse/PIVOT-718 ).
I'm sorry, I know Pivot Trees very little ... so before doing anything
I'd like to better understand if I have found a deeper problem than
the original one of the ticket (and I hope no :-) ).

So, if someone has more knowledge of this problem, tell me or write
here, or better in the ticket (so whe have a single place for all
infos).

Thank you to all.

Bye,
Sandro

Re: TreeView & TreeViewSelectionListener

Posted by Sandro Martini <sa...@gmail.com>.
Ok, I'll try to take a look at it ... thank you for the moment.

Bye,
Sandro

Re: TreeView & TreeViewSelectionListener

Posted by anton dos santos <ad...@free.fr>.
created PIVOT-718 <https://issues.apache.org/jira/browse/PIVOT-718>

On 18/03/2011 11:10, Sandro Martini wrote:
> Hi Anton,
> can you add a ticket in our jira (assigning it to 2.0.1 release as fix), and
> attach there a small test case (inside a zip) ?
>
> So I/we can try to look at it faster ...
>
> Thank you.
>
> Bye,
> Sandro
>
>
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TreeView-TreeViewSelectionListener-tp2690647p2697386.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>
>


Re: TreeView & TreeViewSelectionListener

Posted by Sandro Martini <sa...@gmail.com>.
Hi Anton,
can you add a ticket in our jira (assigning it to 2.0.1 release as fix), and
attach there a small test case (inside a zip) ?

So I/we can try to look at it faster ...

Thank you.

Bye,
Sandro


--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/TreeView-TreeViewSelectionListener-tp2690647p2697386.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: TreeView & TreeViewSelectionListener

Posted by anton dos santos <ad...@free.fr>.
with debugger:
in TreeView#itemsRemoved(), clearAndDecrementPaths() is invoked and returns 0. Listeners are invoked 
when > 0 is returned.
but I could not understand what clearAndDecrementPaths() is doing :(

On 16/03/2011 21:43, Greg Brown wrote:
> The listener should be invoked. Sounds like a potential bug.
>
> On Mar 16, 2011, at 4:38 PM, anton dos santos wrote:
>
>> Hi
>> I have a TreeView with a TreeViewSelectionListener, but the listener doesn't get invoked when a item is removed from the tree.
>> I do : tree.getTreeData().remove( tree.getSelectedNode());
>> tree is refreshed : the removed node is no longer shown, no node is selected but the listener is not invoked.
>> Am I missing something ?
>> ps: The same strategy works fine with ListView.
>>
>> Regards
>> Anton
>
>


Re: TreeView & TreeViewSelectionListener

Posted by Greg Brown <gk...@verizon.net>.
The listener should be invoked. Sounds like a potential bug.

On Mar 16, 2011, at 4:38 PM, anton dos santos wrote:

> Hi
> I have a TreeView with a TreeViewSelectionListener, but the listener doesn't get invoked when a item is removed from the tree.
> I do : tree.getTreeData().remove( tree.getSelectedNode());
> tree is refreshed : the removed node is no longer shown, no node is selected but the listener is not invoked.
> Am I missing something ?
> ps: The same strategy works fine with ListView.
> 
> Regards
> Anton