Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Text type listener problem
Text type listener problem [message #481704] Sun, 23 August 2009 19:50 Go to next message
B. Todorov is currently offline B. TodorovFriend
Messages: 8
Registered: July 2009
Junior Member
I create standard Text component and add listener:
txtUsername.addListener(SWT.KeyUp, listener);

The problem is that, when call "txtUsername.getText()" in the listener -
the last letter is missing. Example: I've written "test" in the
"txtUsername" field and when I call "txtUsername.getText()" in the
listener it returns "tes"(without "t").

Thanks!
Re: Text type listener problem [message #481763 is a reply to message #481704] Mon, 24 August 2009 08:55 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi,

the KeyEvents were originally invented for the usage in celleditors.
You should go for ModifyListener (or VerifyListener if needed) and not
use the raw KeyListeners.

If you still encounter problems, you should provide a small snippet to
show the problem.

Regards
Ben

B. Todorov wrote:
> I create standard Text component and add listener:
> txtUsername.addListener(SWT.KeyUp, listener);
>
> The problem is that, when call "txtUsername.getText()" in the listener -
> the last letter is missing. Example: I've written "test" in the
> "txtUsername" field and when I call "txtUsername.getText()" in the
> listener it returns "tes"(without "t").
>
> Thanks!
>
Re: Text type listener problem [message #483047 is a reply to message #481763] Sun, 30 August 2009 07:39 Go to previous message
B. Todorov is currently offline B. TodorovFriend
Messages: 8
Registered: July 2009
Junior Member
Thank you. It's fine now.
Previous Topic:Problem with ToolItem image
Next Topic:Images on Button
Goto Forum:
  


Current Time: Fri Apr 26 13:43:03 GMT 2024

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

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

Back to the top