Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeListener is not notified when TreeItem.setExpanded is called
TreeListener is not notified when TreeItem.setExpanded is called [message #437849] Fri, 11 June 2004 04:07 Go to next message
gateway is currently offline gatewayFriend
Messages: 7
Registered: July 2009
Junior Member
I instantiate a Tree and call Tree.addTreeListener() in order to listen
for expansion and collapsing. My listener is notified in case of events
caused by mouse and keyboard.
I also expect to get a notification when TreeItem.setExpanded() method is
called, which does not really happen. I this a feature or a bug?
Re: TreeListener is not notified when TreeItem.setExpanded is called [message #437874 is a reply to message #437849] Fri, 11 June 2004 16:32 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
This is by design.

"Vasili Smaliak" <vsmaliak@yahoo.com> wrote in message
news:cabb6a$vnf$1@eclipse.org...
> I instantiate a Tree and call Tree.addTreeListener() in order to listen
> for expansion and collapsing. My listener is notified in case of events
> caused by mouse and keyboard.
> I also expect to get a notification when TreeItem.setExpanded() method is
> called, which does not really happen. I this a feature or a bug?
>
Re: TreeListener is not notified when TreeItem.setExpanded is called [message #437875 is a reply to message #437849] Fri, 11 June 2004 16:35 Go to previous messageGo to next message
Simone Gianni is currently offline Simone GianniFriend
Messages: 29
Registered: July 2009
Junior Member
Vasili Smaliak wrote:

> I instantiate a Tree and call Tree.addTreeListener() in order to listen
> for expansion and collapsing. My listener is notified in case of events
> caused by mouse and keyboard.
> I also expect to get a notification when TreeItem.setExpanded() method is
> called, which does not really happen. I this a feature or a bug?
>


Could you please specify on which platform you are running? Under
Windows XP i get notifications when i call setExpanded(true). I have to
remove the listener and then readd it to avoid getting this notifications.

Simone Gianni
Re: TreeListener is not notified when TreeItem.setExpanded is called [message #437906 is a reply to message #437875] Fri, 11 June 2004 23:20 Go to previous messageGo to next message
gateway is currently offline gatewayFriend
Messages: 7
Registered: July 2009
Junior Member
XP Professional, SWT M08


> Could you please specify on which platform you are running? Under
> Windows XP i get notifications when i call setExpanded(true). I have to
> remove the listener and then readd it to avoid getting this notifications.

> Simone Gianni
Re: TreeListener is not notified when TreeItem.setExpanded is called [message #437907 is a reply to message #437874] Fri, 11 June 2004 23:21 Go to previous messageGo to next message
gateway is currently offline gatewayFriend
Messages: 7
Registered: July 2009
Junior Member
I there a reason for such design?


Steve Northover wrote:

> This is by design.

> "Vasili Smaliak" <vsmaliak@yahoo.com> wrote in message
> news:cabb6a$vnf$1@eclipse.org...
> > I instantiate a Tree and call Tree.addTreeListener() in order to listen
> > for expansion and collapsing. My listener is notified in case of events
> > caused by mouse and keyboard.
> > I also expect to get a notification when TreeItem.setExpanded() method is
> > called, which does not really happen. I this a feature or a bug?
> >
Re: TreeListener is not notified when TreeItem.setExpanded is called [message #438017 is a reply to message #437875] Mon, 14 June 2004 19:52 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
It is a bug. Can you enter a bug report with some code that shows the
problem? Thanks.

"Simone Gianni" <s.gianni@thebug.it> wrote in message
news:cacmgr$hlr$2@eclipse.org...
> Vasili Smaliak wrote:
>
> > I instantiate a Tree and call Tree.addTreeListener() in order to listen
> > for expansion and collapsing. My listener is notified in case of events
> > caused by mouse and keyboard.
> > I also expect to get a notification when TreeItem.setExpanded() method
is
> > called, which does not really happen. I this a feature or a bug?
> >
>
>
> Could you please specify on which platform you are running? Under
> Windows XP i get notifications when i call setExpanded(true). I have to
> remove the listener and then readd it to avoid getting this notifications.
>
> Simone Gianni
Re: TreeListener is not notified when TreeItem.setExpanded is called [message #438018 is a reply to message #437907] Mon, 14 June 2004 19:56 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Yes.

There are 2 options: either call the callback or don't. If the callback is
always called, then those people who wish to avoid the callback for
performance reasons and to avoid multiple updates when the API that causes
the callback is called multiple times must either remove and add the
listeners or implement a stacking 'ignore' flag. If the callback isn't
called, then those people who want it called can call their own internal API
to do the work that the callback would do when they call the API. There is
no right answer but the second one is potentially faster and easier for
people who want to work around it.

"Vasili Smaliak" <vsmaliak@yahoo.com> wrote in message
news:cadepi$af9$1@eclipse.org...
> I there a reason for such design?
>
>
> Steve Northover wrote:
>
> > This is by design.
>
> > "Vasili Smaliak" <vsmaliak@yahoo.com> wrote in message
> > news:cabb6a$vnf$1@eclipse.org...
> > > I instantiate a Tree and call Tree.addTreeListener() in order to
listen
> > > for expansion and collapsing. My listener is notified in case of
events
> > > caused by mouse and keyboard.
> > > I also expect to get a notification when TreeItem.setExpanded() method
is
> > > called, which does not really happen. I this a feature or a bug?
> > >
>
>
Previous Topic:Native Combo Style
Next Topic:Dialog for path (not file)
Goto Forum:
  


Current Time: Thu Mar 28 23:26:09 GMT 2024

Powered by FUDForum. Page generated in 0.05583 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top