EditMask & Bar Code Scanners

EditMask & Bar Code Scanners

Post by José Romer » Sun, 31 Dec 1899 09:00:00



Hello guys,

I've a field on a table with the mask: >LL\-00>L;1;_
ie.  AA-51A

But, when i read any string from the scanner  the system (Win95 and my app)
hang up.
With out the mask, all fine.

Some ideas,

Jos Romero

 
 
 

EditMask & Bar Code Scanners

Post by reastlac » Sun, 31 Dec 1899 09:00:00




> Hello guys,

> I've a field on a table with the mask: >LL\-00>L;1;_
> ie.  AA-51A

> But, when i read any string from the scanner  the system (Win95 and my
app)
> hang up.
> With out the mask, all fine.

> Some ideas,

> Jos Romero


I believe that Delphi edit masks send keyboard commands back to the
keyboard to make it uppercase and lowercase as you key into the field.
This caused havoc with the keyboard on my computer, and the only solution I
found was to replace the keyboard.  If your barcode wand is a keyboard
wedge, the commands being sent to the keyboard may be confusing the wand or
screwing up Windows.  Even if it's a serial wand using software to
translate the bar code to keystrokes, these signals may still be causing
the problems you are having.

Instead of using an edit mask, try validating and/or modifying the input
programatically after the bar code has been wanded in.  I've been doing
programming for years using bar code input, and I've found that it's not a
good idea to use hot validation (like edit-masks) with barcode input.  Hot
validation is meant to provide instant feedback to the user, and this
becomes meaningless with bar code readers.  In addition, you can have major
problems if the edit mask "tosses out" some keystrokes but still allows the
overall input to pass.  Another caveat - watch out for double wanding.
I've had cases where the first input from the barcode reader is rejected,
but when the barcode is wanded again (appending the input to the original
input) it passes.  The solution is to clear the field if the barcode does
not pass the edit check.