Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7982] Android: Titanium.App: certain methods are case wrong and when calling the method gives a runtime error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-02T14:20:40.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsAndroid
Labelsmodule_app_properties, parity, qe-testadded
ReporterNatalie Huynh
AssigneeOpie Cyrus
Created2012-03-13T16:36:39.000+0000
Updated2012-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.

Comments

  1. Neeraj Gupta 2012-03-13

    Note that iOS supports both uppercase and lowercase. Mobile Web is now adding uppercase (in addition to existing lowercase) to be at parity.
  2. Ivan Skugor 2012-03-14

    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.
  3. Opie Cyrus 2012-03-14

    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());
       
  4. Wilson Luu 2012-03-16

    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)
  5. Natalie Huynh 2012-04-02

    Open to update label

JSON Source