Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Spinner and Text have a focus problem
Spinner and Text have a focus problem [message #123873] Fri, 06 March 2009 09:44 Go to next message
Eclipse UserFriend
Hi,

I have the following Code:

Text a = new Text(parent, SWT.NONE);
a.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent event) {
System.out.println("Text.focusLost");
}

public void focusGained(final FocusEvent event) {
System.out.println("Text.focusGained");
}
});
Spinner s = new Spinner(parent, SWT.NONE);
s.addFocusListener(new FocusAdapter() {
public void focusLost(final FocusEvent event) {
System.out.println("Spinner.focusLost");
}

public void focusGained(final FocusEvent event) {
System.out.println("Spinner.focusGained");
}
});

Now there are two problems (maybe the same cause):
1. When I click in the text field, the "Text.focusGained" is printed, and if
I then click i.e. on a view tab, then "Text.focusLost" is printed, so
everything is fine.
Now when I click in the text field, the "Text.focusGained" is printed, and
if I then click in the Spinner, the no "Text.focusLost" is printed, so
focusLost is not called. After that, if I click on i.e. on a view tab, then
"Text.focusLost" is printed. So it seems to have something to do with the
Spinner.
2. The focus events of the Spinner are not called as no message from the
listener is printed.

Regards,
Markus
Re: Spinner and Text have a focus problem [message #123953 is a reply to message #123873] Mon, 09 March 2009 05:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi Markus,

this looks like a bug. Could you file it in bugzilla?

Thank you!
Ralf

Markus Krüger wrote:
> Hi,
>
> I have the following Code:
>
> Text a = new Text(parent, SWT.NONE);
> a.addFocusListener(new FocusAdapter() {
> public void focusLost(final FocusEvent event) {
> System.out.println("Text.focusLost");
> }
>
> public void focusGained(final FocusEvent event) {
> System.out.println("Text.focusGained");
> }
> });
> Spinner s = new Spinner(parent, SWT.NONE);
> s.addFocusListener(new FocusAdapter() {
> public void focusLost(final FocusEvent event) {
> System.out.println("Spinner.focusLost");
> }
>
> public void focusGained(final FocusEvent event) {
> System.out.println("Spinner.focusGained");
> }
> });
>
> Now there are two problems (maybe the same cause):
> 1. When I click in the text field, the "Text.focusGained" is printed, and if
> I then click i.e. on a view tab, then "Text.focusLost" is printed, so
> everything is fine.
> Now when I click in the text field, the "Text.focusGained" is printed, and
> if I then click in the Spinner, the no "Text.focusLost" is printed, so
> focusLost is not called. After that, if I click on i.e. on a view tab, then
> "Text.focusLost" is printed. So it seems to have something to do with the
> Spinner.
> 2. The focus events of the Spinner are not called as no message from the
> listener is printed.
>
> Regards,
> Markus
>
>
Re: Spinner and Text have a focus problem [message #123979 is a reply to message #123953] Mon, 09 March 2009 06:42 Go to previous message
Eclipse UserFriend
Bug: 267606

"Ralf Sternberg" <rsternberg@eclipsesource.com> schrieb im Newsbeitrag
news:gp2mcl$23c$1@build.eclipse.org...
> Hi Markus,
>
> this looks like a bug. Could you file it in bugzilla?
>
> Thank you!
> Ralf
>
> Markus Kr
Previous Topic:Confuse Service Release and Release version
Next Topic:How to open a new tab in the same browser RAP is running in?
Goto Forum:
  


Current Time: Wed Jul 23 13:46:36 EDT 2025

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

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

Back to the top