I am doing a application in Titanium with this specifications:
- Application type: mobile
- Titanium SDK: Titanium Studio, build: 3.2.3.201404181442 with SDK 3.2.3 GA
- Platform & version: The application is for Androit and iOS. The error happened when the app was using in Android in a Samsung Galaxy Tab 3 with the Android version 4.1.2.
- Host Operating System: Windows 7.
The error is caused when I don't complete some field of form and I wait a message with validations the fields required but the app crash is before the finish the button function.
This is the button funtion
summitbutton.addEventListener('click', function(e) { alert('entra al metodo'); //BorrarT // Make insert to local database arrayRequired = []; geographicValues = { 'idadminArea' : pickerAreaSelec, 'idsubAdminArea' : pickerSubAreaSelec, 'village' : villageTxt.value, 'address1' : direccionTxt.value, 'idregion' : pickerRegionSelec, 'idsubRegion' : pickerSubRegionSelec }; var areaSele = geographicValues['idadminArea']; alert('1. areaSele: ' + areaSele + '/nformValid: ' + formValid); //BorrarT if (areaSele === -1) { formValid = false; arrayRequired.push(L('msgStateequired') + '\n\n'); }; if (geographicValues['idsubAdminArea'] === -1) { formValid = false; arrayRequired.push(L('msgCountyRequired') + '\n\n'); }; alert('1. areaSele: ' + areaSele + '\n2. idsubAdminArea: ' + geographicValues['idsubAdminArea'] + '\nformValid: ' + formValid); //BorrarT if (formValid === true) { alert('3. formValid: ' + areaSele); //BorrarT winFormProducerGeographyInfo.ingresoInformacion = 1; if (id !== undefined) { producerData['IDADMIN_AREA'] = geographicValues['idadminArea']; producerData['IDSUB_ADMIN_AREA'] = geographicValues['idsubAdminArea']; producerData['VILLAGE'] = geographicValues['village']; producerData['ADDRESS1'] = geographicValues['address1']; producerData['IDREGION'] = geographicValues['idregion']; producerData['IDSUB_REGION'] = geographicValues['idsubRegion']; winFormProducerGeographyInfo.currentPosition = currentPosition; } else { winFormProducerGeographyInfo.prodGeogInfoFormValues = geographicValues; winFormProducerGeographyInfo.currentPosition = currentPosition; }; winFormProducerGeographyInfo.close(); } else { lblMessage.text = ''; alertDialog.message = ''; formValid = true; for (var i = 0, j = arrayRequired.length; i < j; i++) { lblMessage.text += arrayRequired[i]; }; alertDialog.message = lblMessage.text; alertDialog.show(); } alert('4. Final: ' + areaSele); });The application crash in the code is before of
if (formValid === true)Before of the change of sdk, It didn't ocurre this problem. I was worked with the SDK 3.1.0.