Skip to main content



      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 10:02 Go to next message
Eclipse UserFriend
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 10:44 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 08:56:02 EDT 2025

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

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

Back to the top