Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Focus listener - inconsistent behavior
Focus listener - inconsistent behavior [message #658105] Sun, 06 March 2011 08:36 Go to next message
Eclipse UserFriend
I've written an application that allows editing a property value in the properties tab.
Upon exiting the cell, after edit, a dialog message appears.
I've noticed that there's a different behavior in the cell's value when the dialog appears, depending on the location of the cursor's focus.

The following behavior occurs when the dialog appears
If the cursor is moved and the focus is now on a different property then the original value appears in the cell instead of the new value.
However if the cursor is moved to a cell where no property is defined then the new value appears (to me this seems the correct behavior)

I think that the different behavior is somehow related to fireApplyEditorValue in CellEditor

If the method is called and the cursor is moved to a different property then the value is reverted.
If the method is called and the cursor is moved to cell that does not contain a property then the value doesn't change.

If the method is not called and the cursor is moved to a different property then the value is doesn't change.
If the method is not called and the cursor is moved to cell that does not contain a property then the value doesn't change but the dialog does not appear.

I tried to override the method but I don't see how to detect the cursor's location.

To narrow down the issue, there's a different behavior if the focus is on a line containing a property or on a line that doesn't have a property.

Any help would be appreciated, thank you.

[Updated on: Mon, 07 March 2011 05:23] by Moderator

Re: Focus listener - inconsistent behavior [message #658204 is a reply to message #658105] Mon, 07 March 2011 07:08 Go to previous message
Eclipse UserFriend
Hi, you could try posting this in the JFace forum.
Previous Topic:Generate HTML view with SWT widget drop
Next Topic:Showing the horizontal scroll bar of a Combo
Goto Forum:
  


Current Time: Sun Jul 27 09:31:34 EDT 2025

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

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

Back to the top