Roberto Lopez wrote: ↑Thu Aug 23, 2018 11:07 pm
I've wrote "defensive code" against this possibility, so is not a problem for me, but, I'm simply curious about that
I had no doubt you would securing your code against the possibility of two identical bar-codes.
And like you, curiosity was the "attractor" of my interference in this thread.
I'm using b-codes years now, in a pos app, that's written in harbour textual interface -now slowly transforming it to gui.
I have never encountered such a case of duplicate b-codes in whatever system (EAN-xxx etc) they might be coded.
To the contrary, what I have faced is the situation where the very SAME product has many different bar-codes!!
This is due to the need to cover the different sizes/colors of the same item --usually seen on clothes/shoes etc.
(Anyway, somehow I did manage to cope with it, avoiding the need to create multiple of records for the same item.)
Roberto Lopez wrote: ↑Thu Aug 23, 2018 11:07 pm
I've googled it without luck.
Indeed, google has no much to say us about identical b-codes, and perhaps this lack of info is analogous
to the probability that such duplicate bar-codes do exist. Luckily, the world isn't currently bothered by yet another one
IT mess.
Btw, I suspect that reason the `onChange` event is fired only once, is because scanner sends along with the barcode an `Enter` as a suffix of the digits sequence. Perhaps, the use of `onEnter` event could be considered a good alternative to avoid repeated firing on keybord input, unless it is intentionally designed and aimed to do so.
---
Regards,
Pete