Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » verifyEvent.doit = false does not work
verifyEvent.doit = false does not work [message #136925] Thu, 18 June 2009 14:02 Go to next message
Martin Kubitza is currently offline Martin KubitzaFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

I am using a simple verifylistener that allows only E F I S T or backspace.

This works fine in RCP:
If typing any other characters than the allowed the message is displayed
and the wrong character is revoked (because of doit=false).

if (!(verifyEvent.text.toUpperCase().matches("[EFIST]"))
& !(verifyEvent.keyCode==SWT.BS))
{

MessageDialog.openError(
PlatformUI.getWorkbench().
getActiveWorkbenchWindow().getShell()
, "Error"
, "Eingabefehler:\n"
+ "Es sind nur E, F, I, S oder T erlaubt.");

verifyEvent.doit = false;
}

But within RAP the doit=false has no effect!

The message appears, but the wrong character still remains in the textfield.

And even backspace is not accepted as valid character in RAP (in RCP it is).

Are these bugs or features ??

(I am using RAP-Target v120-RC2)


Regards,
Martin Kubitza
T&P Bochum, Germany
Re: verifyEvent.doit = false does not work [message #136975 is a reply to message #136925] Thu, 18 June 2009 14:44 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Martin,

are you aware of this bug:
244008: VerifyEvent field values differ from SWT
https://bugs.eclipse.org/bugs/show_bug.cgi?id=244008

In the Controls Demo - TextTab.java there is an example for "numbers
only" verify listener.

Best,
Ivan

Martin Kubitza wrote:
> Hello,
>
> I am using a simple verifylistener that allows only E F I S T or
> backspace.
>
> This works fine in RCP:
> If typing any other characters than the allowed the message is
> displayed and the wrong character is revoked (because of doit=false).
>
> if (!(verifyEvent.text.toUpperCase().matches("[EFIST]"))
> & !(verifyEvent.keyCode==SWT.BS))
> {
>
> MessageDialog.openError(
> PlatformUI.getWorkbench().
> getActiveWorkbenchWindow().getShell()
> , "Error"
> , "Eingabefehler:\n"
> + "Es sind nur E, F, I, S oder T erlaubt.");
>
> verifyEvent.doit = false;
> }
>
> But within RAP the doit=false has no effect!
>
> The message appears, but the wrong character still remains in the
> textfield.
>
> And even backspace is not accepted as valid character in RAP (in RCP
> it is).
>
> Are these bugs or features ??
>
> (I am using RAP-Target v120-RC2)
>
>
> Regards,
> Martin Kubitza
> T&P Bochum, Germany
Previous Topic:Is it still impossible to use GC in RAP?
Next Topic:I18 questions
Goto Forum:
  


Current Time: Fri Dec 03 17:21:25 GMT 2021

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

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

Back to the top