[TIMOB-7982] Android: Titanium.App: certain methods are case wrong and when calling the method gives a runtime error
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-04-02T14:20:40.000+0000 |
| Affected Version/s | Release 2.0.0 |
| Fix Version/s | Release 2.0.0, Sprint 2012-06 |
| Components | Android |
| Labels | module_app_properties, parity, qe-testadded |
| Reporter | Natalie Huynh |
| Assignee | Opie Cyrus |
| Created | 2012-03-13T16:36:39.000+0000 |
| Updated | 2012-04-02T14:20:40.000+0000 |
Description
Steps to Reproduce:
1. Call these properties in an application:
Titanium.App.getId()
Titanium.App.getUrl()
Titanium.App.getGuid()
Actual:
Runtime Error
Expected:
To load the correct values
Note:
Need to call getID, getURL, getGUID but that is wrong according to the docs, since we have been supporting the wrong case, we need to support the upper-case and the lower-case.
Note that iOS supports both uppercase and lowercase. Mobile Web is now adding uppercase (in addition to existing lowercase) to be at parity.
I think that good naming convention is important. Having two naming conventions will lead to confusion (and it is against DRY principles). Since there are names "UI", "iOS", "API" ... I think that "getURL" should be good choice.
PR https://github.com/appcelerator/titanium_mobile/pull/1681 submitted. Test case to verify variants are supported:
Ti.API.info("getID():" + Titanium.App.getID()); Ti.API.info("id:" + Titanium.App.id); Ti.API.info("getId():" + Titanium.App.getId()); Ti.API.info("getURL():" + Titanium.App.getURL()); Ti.API.info("url:" + Titanium.App.url); Ti.API.info("getUrl():" + Titanium.App.getUrl()); Ti.API.info("getGUID():" + Titanium.App.getGUID()); Ti.API.info("guid:" + Titanium.App.guid); Ti.API.info("getGuid():" + Titanium.App.getGuid());Closing bug. Verified fix on: SDK build: 2.0.0.v20120316104738 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203152033 Device: Nexus S (2.3.6)
Open to update label