{ "id": "118489", "key": "TIMOB-14881", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-08-14T11:52:03.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-3.1.2" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:58.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Getter and Setter not getting added for any new property on NativeObject automatically where as it works fine on ios.\r\n\r\n{code}\r\nvar win=Ti.UI.createWindow();\r\nvar myApp = {};\r\n \r\nmyApp.ui = {};\r\n \r\nmyApp.ui.createMyView = function() {\r\n var v = Ti.UI.createView({});\r\n v.foo = 100;\r\n \r\n v.getSomething = function() {\r\n return v.foo;\r\n };\r\n \r\n v.setSomething = function(val) {\r\n v.foo = val;\r\n }\r\n \r\n v.getFood = 200;\r\n \r\n return v;\r\n};\r\n \r\nvar myView = myApp.ui.createMyView();\r\n \r\nTi.API.info(myView.getSomething);\r\nTi.API.info(myView.setSomething);\r\nTi.API.info(myView.getFood);\r\nTi.API.info(myView.getFoo);\r\n \r\nTi.API.info(myView.getSomething());\r\nmyView.setSomething(50);\r\nTi.API.info(myView.getSomething());\r\n \r\nTi.API.info(myView.getFoo());\r\nmyView.setFoo(10);\r\nTi.API.info(myView.getFoo());\r\nwin.open();\r\n{code}\r\n\r\nExpected Result:\r\nThis is for ios:\r\n[INFO] \r\n[INFO] \r\n[INFO] 200\r\n[INFO] [object TiUIView]\r\n[INFO] 100\r\n[INFO] 50\r\n[INFO] 50\r\n[INFO] 10\r\n\r\nActual Result:\r\nOn ios:\r\n[INFO] \r\n[INFO] \r\n[INFO] 200\r\n[INFO] [object TiUIView]\r\n[INFO] 100\r\n[INFO] 50\r\n[INFO] 50\r\n[INFO] 10\r\n\r\nOn android: Getting exception\r\n\r\nE/TiExceptionHandler(19656): (main) [1,11350] - In acceptance.js:668,22\r\nE/TiExceptionHandler(19656): (main) [0,11350] - Message: Uncaught TypeError: Object # has no method 'getFoo'\r\nE/TiExceptionHandler(19656): (main) [1,11351] - Source: \t\tTi.API.info(myView.getFoo());\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Getter and Setter not getting added for any new property on NativeObject", "creator": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Verified with:\r\n\r\nStudio: 3.1.2.201308091728\r\nSDK: 3.1.2.v20130813151607\r\nacs:1.0.5\r\nalloy:1.2.0-alpha6\r\ntitanium:3.1.2-alpha\r\ntitanium-code-processor:1.0.2-alpha\r\nOS: OSX 10.8.4\r\nDevice: Nexus 7(v4.2.1)\r\nXcode:4.6.3\r\n", "comment": { "comments": [ { "id": "269147", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reproducible on Android device and simulator.\r\n\r\nTitanium SDK 3.1.3.v20130829174830\r\nAppcelerator Studio 3.1.3.201308252005\r\nCLI 3.1.2.GA\r\nNode 0.10.13\r\n\r\n\r\nAlso, fixed a small typo in the sample code:\r\nline 30:\r\n{code}\r\nTi.API.info(myView.getSomething())l\r\n{code}\r\n\r\nchanged to:\r\n{code}\r\nTi.API.info(myView.getSomething());\r\n{code}\r\n", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-30T22:29:28.000+0000", "updated": "2013-08-30T22:35:04.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }