I have a sample app for scanning barcode and would like the input box onchange event to fire when the image scan has completed. Then navigate to another screen. The navigation function work if I tab away from the box "lostfocus" or press return, but, if I scan the event does not fire when the input box changes from empty to the scan results. Some examples suggest that updateContext function using a variable, but, input boxes do not have a text property.
Any suggestions would be greatly appreciated.
Would it be available for you to share some information regarding the controls used in your App?
A barcode scanner control and a TextInput?
The Onchange property of the TextInput controls how the app responds when the user changes the value of a control (for example, by adjusting a slider).
I will try to make some tests from my side, and see if I could find out any workarounds.
The app is very simple. It has two screens. The first screen has a camera control named MyScanner and a textinput box name TextInput1 with the OnChange propertie set to Navigate(Screen2, Fade) and the Default propertie set to MyScanner.Text.
The second screen has a button that navigates back to Screen1, and two text boxes. One text box is a caption for the second text box that indicates the contents of hte box below it. The second text box has its Text property set to TextInput1.Text.
Now if I run the app from my iPhone the scanner will populate the TextInput1 with the desired information, but, the only way I have been able to get the OnChange event to fire is to select the text box type a space and press the return key on the soft keyboard. Do I need to us an edit form control and then place my on controls the first screen? Using a traditional HTML input form with a bit of java would produce the desired result.
Any news on this? Trying to make the scanner hidden once it actually scans something. But data getting into input doesn't fire the OnChange event and there's no event onScanned either.