Blocking single and double quotes in GET

This forum is for eXpress++ general support.
Message
Author
Andy Edward
Posts: 103
Joined: Fri Sep 17, 2010 2:58 am

Re: Blocking single and double quotes in GET

#11 Post by Andy Edward »

Hi Tom and Roger,

Thank you for the solution. It's working fine and I will be implementing this.

@Tom, as you mentioned that pasted text are not affected by the keyblock, may I know why is that so? and is there any method that can detect GET changes (user pasting in text)?

Is there no event registered when pasting text to a GET?

Regards,

Andy

User avatar
Tom
Posts: 831
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Blocking single and double quotes in GET

#12 Post by Tom »

Hi, Andy.

This is because KEYBLOCK (which uses oSLE:Keyboard) only recognizes keyboard events. Dealing with pasted textes is a little harder, since they may come with <Ctrl-V> (you may catch that in the function) or a mouse event (LbUp) - or even from a drag event. The simplest solution would be to add a LOSTFOCUS-clause to the gets (you may use the technique I showed you) and revise the text there. Or you just ignore that possible situation, since it's not very likely that a text containing quotes is pasted there. It may also be possible to use the VALID clause, since it's able to revert the EditBuffer.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Andy Edward
Posts: 103
Joined: Fri Sep 17, 2010 2:58 am

Re: Blocking single and double quotes in GET

#13 Post by Andy Edward »

Hi Everyone,

I just want to give an update on the matter, the issue has been resolved by Alaska in the newest Xbase++ 2.0 build 703

Indexing and Seeking when the data contains single AND/OR double quotes will be fine now.

Regards,

Andy

Post Reply