Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » MenuItem tooltip timer exception
MenuItem tooltip timer exception [message #1759987] Thu, 20 April 2017 21:40 Go to next message
Bo Berney is currently offline Bo BerneyFriend
Messages: 12
Registered: July 2009
Junior Member
This worked with Eclipse 3.7, but when we upgraded to 4.5.2, we started getting a NullPointerException in Menu.wmTimer.

The problem is that we have a menu that if you hover over a menu item for a second, we change the MenuItem to a cascade menu with Rename and Delete options. The original non-cascading MenuItem is disposed.

The problem is that a timer is started when a MenuItem is selected so that a tooltip can be popped up after a short delay. The wmTimer method does NOT check selectedMenuItem.isDisposed(), so I get an exception. I don't even know why the timer is even started in the first place when the tooltips are null.

I could not find a way around the above issue, so we basically have to rewrite our whole bookmark/favorite menu functionality.
Re: MenuItem tooltip timer exception [message #1760057 is a reply to message #1759987] Fri, 21 April 2017 14:27 Go to previous messageGo to next message
Eclipse UserFriend
Create a patch and post to swt-dev.
Re: MenuItem tooltip timer exception [message #1760070 is a reply to message #1760057] Fri, 21 April 2017 17:23 Go to previous message
Bo Berney is currently offline Bo BerneyFriend
Messages: 12
Registered: July 2009
Junior Member
I'll submit a patch when I get time. For now, using reflection to set Menu.selectedMenuItem to null prior to disposing the menu item.
Previous Topic:swt browser - no more handles Error
Next Topic:Custom composites & listener/event handling
Goto Forum:
  


Current Time: Sat Apr 20 00:18:44 GMT 2024

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

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

Back to the top