Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6436] Please check the following bug:

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2019-12-26T15:03:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labels8.3.0.v20191115075757
ReporterAndreas Pingas
AssigneeMotiur Rahman
Created2019-11-18T13:28:38.000+0000
Updated2019-12-26T15:03:45.000+0000

Description

Ti.App.Properties.setString('currentCountry', Titanium.Locale.currentCountry.toUpperCase());
[ERROR] :  Script Error {
[ERROR] :      column = 77;
[ERROR] :      line = 27;
[ERROR] :      message = "undefined is not an object (evaluating 'Titanium.Locale.currentCountry.toUpperCase')";
[ERROR] :      sourceURL = "file:///Users/sweetpeen/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Manager.app/app.js";
[ERROR] :      stack = "    at (/app.js:27:77)\n    at global code(/app.js:461:70)\n    at require@[native code]\n    at (/ti.main.js:17723:8)\n    at loadAsync(/ti.main.js:17649:9)\n    at global code(/ti.main.js:17720:10)";
[ERROR] :      toJSON = "<KrollCallback: 0x600000316500>";
[ERROR] :  }

Comments

  1. Nazmus Salahin 2019-11-21

    Hello! Thanks for reaching to us. Please share the following information: 1. Sample test code and steps to reproduce the issue. 2. In which platform are you getting this issue. 3. Share your appc ti info and full trace log. Thanks
  2. Michael Gangolf 2019-11-21

    BTW: toUpperCase() is not needed since it will return an uppercase value:
       console.log(Titanium.Locale.currentCountry);
       console.log(Titanium.Locale.currentCountry.toUpperCase());
       
    with 8.3.0.RC (8.3.0.v20191115162504) *Android*: works fine *iOS (simulator)*: currentCountry is undefined, that's why toUpperCase() will throw an error. *Workaround*: check for undefined and don't use toUpperCase()
  3. Andreas Pingas 2019-11-21

    Okay thanks!

JSON Source