[AC-2900] Using or operator with Ti.App variable generates invalid code in defines.h
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2011-12-26T05:25:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | compiler, defines.h, ios |
Reporter | Jason Hinkle |
Assignee | Paul Dowsett |
Created | 2011-11-10T21:37:54.000+0000 |
Updated | 2016-03-08T07:47:52.000+0000 |
Description
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.
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
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