Tuesday, October 27, 2009

Eclipse SWT 3.5 and an annoying change...

after I moved a part of my software over to eclipse 3.5 to take advantage of bug fixes and new features I noticed that some of my dialogs don't work anymore.

For example the login dialog has 2 fiels. A username and a password. These fields are defiend like this:

password = new Text(content, SWT.BORDER | SWT.PASSWORD);
user = new Text(content, SWT.BORDER);


and in the key listener I validate the inputs. But with version 3.5 key listener won't work on password fields anymore and I didn't find any documentation about it. So instead you need to use a modify listener now

password.addModifyListener(new ModifyListener() {

public void modifyText(ModifyEvent e) {

No comments:

Post a Comment