Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:44 Go to next message
Markus  rüger is currently offline Markus rügerFriend
Messages: 369
Registered: July 2009
Senior Member
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 09:09 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 10:42 Go to previous message
Markus  rüger is currently offline Markus rügerFriend
Messages: 369
Registered: July 2009
Senior Member
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: Fri Dec 03 17:10:59 GMT 2021

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

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

Back to the top