Hello,
My current app has a panel that allows a user to save a record with text data and just a picture, enter the text data, then scan a barcode and save the barcode value, or the combination of both. The picture only works fine. The barcode scan only works fine as well. However, when I scan a barcode (which extracts and displays the data correctly), then take a picture and try to save the record I receive a "Unhandled Javascript Error - phoneGapImageCapture: "Uncaught TypeError: Cannot set property 'Owner_ID' of undefined". Note that 'Owner_ID' is the first field in the list as well as the primary key and linked to a MySQL database. The sequence is: barcode scan, display the barcode value, enter data in 3 controls, take a picture and the image displays correctly in the panel, but then the "save" results in the error message.
I am using the lObj.updateListFromUXControls() in all three cases to save the data as disconnected operation is a requirement. I am using a character type for the image field for a server/S3 upload per the Alpha videos. I currently use the Alpha server as an upload target and I am saving the pic to the phone file system.
This error occurs about 80% of the time which led me to believe there's a timing error since the image capture on PhoneGap is an asynchronous process. I have added both timing loops and completion variables (global) which are set in the client side "On Image Capture" javascript before I update the List to no avail. I have added alert statements before and after the lObj.updateListFromUXControls() statement and this is clearly where the error occurs.
There's no mention of this issue on the PhoneGap forum, this forum, and Google returns no relevant info.
Any thoughts would be appreciated.
Regards,
Joe
My current app has a panel that allows a user to save a record with text data and just a picture, enter the text data, then scan a barcode and save the barcode value, or the combination of both. The picture only works fine. The barcode scan only works fine as well. However, when I scan a barcode (which extracts and displays the data correctly), then take a picture and try to save the record I receive a "Unhandled Javascript Error - phoneGapImageCapture: "Uncaught TypeError: Cannot set property 'Owner_ID' of undefined". Note that 'Owner_ID' is the first field in the list as well as the primary key and linked to a MySQL database. The sequence is: barcode scan, display the barcode value, enter data in 3 controls, take a picture and the image displays correctly in the panel, but then the "save" results in the error message.
I am using the lObj.updateListFromUXControls() in all three cases to save the data as disconnected operation is a requirement. I am using a character type for the image field for a server/S3 upload per the Alpha videos. I currently use the Alpha server as an upload target and I am saving the pic to the phone file system.
This error occurs about 80% of the time which led me to believe there's a timing error since the image capture on PhoneGap is an asynchronous process. I have added both timing loops and completion variables (global) which are set in the client side "On Image Capture" javascript before I update the List to no avail. I have added alert statements before and after the lObj.updateListFromUXControls() statement and this is clearly where the error occurs.
There's no mention of this issue on the PhoneGap forum, this forum, and Google returns no relevant info.
Any thoughts would be appreciated.
Regards,
Joe