Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2900] Using or operator with Ti.App variable generates invalid code in defines.h

GitHub Issuen/a
ResolutionNeeds more info
Resolution Date2011-12-26T05:25:52.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelscompiler, defines.h, ios
ReporterJason Hinkle
AssigneePaul Dowsett


I had the following code in an app: return Titanium.App.statusHistory || ''; It caused the following two lines to be generated in defines.h when attempting to run on the device (did not seem to affect when using the emulator): #define USE_TI_APPSTATUSHISTORY 1 #define USE_TI_APPSTATUSHISTORY||'' 1 The second line caused the compiler to choke with an error. A simple workaround was to re-write the code in my app to not use the "or" operator in that way, however I thought it should be reported.


  1. Paul Dowsett 2011-12-26

    Jason Be aware that you should not add properties to any of the Titanium objects. I will close this ticket for now. Please reopen it if you can prove that this is not the cause. If you do reopen, be certain to follow the [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) guide in full. Thanks
  2. Paul Dowsett 2012-02-17

    Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) to ensure that we can escalate it quickly. Read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) if you have not read it before, and always start a ticket using the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template). Thanks in advance

JSON Source