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
Blocking single and double quotes in GET
-
- Posts: 103
- Joined: Fri Sep 17, 2010 2:58 am
Re: Blocking single and double quotes in GET
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.
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."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
-
- Posts: 103
- Joined: Fri Sep 17, 2010 2:58 am
Re: Blocking single and double quotes in GET
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
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