You haven’t shown us anything about a bar code, so we can’t possibly address that. You did
I do want to point out that this line will never succeed:
if self.input[2] != 0 and not self.input[2]:
That says “if input 2 is not 0 and input 2 is 0.” It can never be both. I can’t guess what you really intended there.
I’m also concerned about these linesL
self.m1, self.t1 = ‘’, ‘’
self.Language()
wx.MessageBox(self.m1, self.t1)
Is the “self.Language()” call going to modify the values of self.m1 and self.t1? If so, that’s a very poor design, because you’re relying on side effects. A person looking at your code would have no way to know that the function call is modifying other variables. If that’s looking up a language translation, it would be much better to pass them as parameters:
m1, t1 = self.Language( ‘’, ‘’ )
Now it’s absolutely clear what goes in, and what comes out.
···
On Jun 22, 2019, at 2:23 AM, d chung dommchung@gmail.com wrote:
I cut away the dlg part and replaced it with some fixed values.
Everything works fine except that the bar code has been read 248 times and there is no loop in the codes. It was entered only once. What went wrong?
—
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.