|Handler enablement doesn't work unless widow focus changes [message #514599]
||Mon, 15 February 2010 17:32
| Mark Leone
Registered: July 2009
I have an RCP app with a handler that appears in a menu added to the main menu bar. I set the enablement of the handler using a property tester.|
When the system property changes such that a command should be disabled, it still shows up as enabled in the menu. But If I select it, I get an exception that says I'm trying to run a command that's disabled.
I found that if, after the system property changes such that the handler should be disabled, I select a different window and the re-select the RCP app window, the menu shows the proper enablement state. So it seems like the menu is not being refreshed when the system property changes, until the app window loses and re-gains focus.
Am I supposed to do something to refresh the menu when the system property changes? I also tried using <visibleWhen> on the menu item, with the same property tester. The same thing happens- I have to make the app window lose and re-gain focus to show the proper visibility state.
My enablement extension looks like this
<systemTest property="myPropertyName" value="theExpectedValue" />
Powered by FUDForum
. Page generated in 0.02073 seconds