For Programmers: Free Programming Magazines  


Home > Archive > Tcl > March 2006 > binding









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author binding
krithiga81@yahoo.com

2006-03-27, 10:01 pm

Hello
I have a question about binding. I am binding each field on a return
and doing some validation

bind .partnum.e <Return> { valid_sys $field(partnum); }

This requires the user to hit return. If the user uses a barcode
scanner, I am told that it has an automatic return to the scanner. So
the user complains that they do not have to hot return key. Is there
anything to TCl code that needs to be added to understand barcode
scanner effect?

Thanks
krithiga

krithiga81@yahoo.com

2006-03-29, 10:01 pm

Hello
Can someone please repsond to my posting?

Thanks
krithiga

Bryan Oakley

2006-03-29, 10:01 pm

krithiga81@yahoo.com wrote:
> Hello
> Can someone please repsond to my posting?


Maybe nobody can answer because you didn't give enough information. You
had some sort of problem with a scanner, which tcl knows nothing about.

The problem is likely one of:

a) a problem with the scanner. You probalby can't fix that with Tcl. Try
reconfiguring the scanner to not send carriage returns

b) a problem with how you are reading and processing data from the
scanner, in which case we can help only if you tell us how you are
getting data from the scanner, or

c) your validation scheme is buggy and you need to rethink how you are
doing validation. It's not clear whether the scanner is bypassing the
validation, or causing the validation without user input and the user is
complaining, or some other alternative.

Perhaps if you can give more specifics we can help, but offhand it
sounds like a configuration problem with your scanner, or an error in
the logic of your application
Les Cargill

2006-03-29, 10:01 pm

krithiga81@yahoo.com wrote:
> Hello
> I have a question about binding. I am binding each field on a return
> and doing some validation
>
> bind .partnum.e <Return> { valid_sys $field(partnum); }
>
> This requires the user to hit return. If the user uses a barcode
> scanner, I am told that it has an automatic return to the scanner. So
> the user complains that they do not have to hot return key. Is there
> anything to TCl code that needs to be added to understand barcode
> scanner effect?
>
> Thanks
> krithiga
>


1) Using Excel or some other program that accepts text as input,
establish exactly what the "scanner driver" ( which creates phony
keystrokes when the scanner emits a poot of serial data ) is doing.

2) Configure the scanner to stop doing anything you don't like.

3) Possibly, use "bind ....e <Key>" instead of "bind... <Enter>"

4) Alternately, take over the serial port yourself and parse the
scanner's output to your liking. Tcl supports serial ports quite
well, although with the default Windows drivers. But they work
well enough.

--
Les Cargill
krithiga81@yahoo.com

2006-03-30, 7:04 pm

Hello
Ok in my code I do validation on pressing Enter. I bind it to the
return Key or TAB key. So when the user enters data he needs to type a
return to validate the data. What they are also using is a barcode
scanner that will scan the numbers and enter into the GUI . I am told
the Scanner has an automatic carriage return and so the question from
the user is if the carriage return is built in the scanner , why do
they need to press RETURN? So in other words the TCL script should do
the validation as there is a return from BARCODE SCANNER. Basically the
user wants to scan all numbers without hitting return.

The scanner is not bypassing the validation .

Is the problem clear?

Thanks
kc

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com