Skip to main content



      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 00:07 Go to next message
Eclipse UserFriend
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 12:32 Go to previous messageGo to next message
Eclipse UserFriend
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 12:35 Go to previous messageGo to next message
Eclipse UserFriend
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 19:20 Go to previous messageGo to next message
Eclipse UserFriend
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 19:21 Go to previous messageGo to next message
Eclipse UserFriend
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 15:52 Go to previous messageGo to next message
Eclipse UserFriend
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 15:56 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 08:35:00 EDT 2025

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

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

Back to the top