{ "id": "91727", "key": "TIMOB-9104", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-02-21T14:24:10.000+0000", "created": "2012-05-10T18:01:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "exalture" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "17222", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "91403", "key": "TIMOB-9102", "fields": { "summary": "iOS: getVisible() / getEnabled() functions could return null value", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2017-03-30T21:25:03.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Problem description\r\nBoolean functions like getVisible() or getEnabled() can return null value\r\n\r\nh2. Code sample\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\texitOnClose:true\r\n});\r\nvar view = Ti.UI.createView({\r\n\ttop:0,\r\n\tleft:0,\r\n\twidth: 10, \r\n\theight:10\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle:'Click Me!'\r\n});\r\n\r\nbutton.addEventListener('click', function(e) { \r\n\talert(view.getVisible());\r\n Ti.\r\n\tview.setVisible(!view.getVisible()); \r\n});\r\n\r\n\r\nwin.add(button);\r\nwin.add(view);\r\n\r\nwin.open();\r\n{code}\r\n\r\nResult: After running the sample code, click on the button to execute view.getVisible(), which return value 'null'.\r\nExpected result: If the property was never defined by the user, then the default value should be returned. \r\n", "attachment": [], "flagged": false, "summary": "Android: getVisible() / getEnabled() functions could return null value", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK tested: 2.0.1 and 2.1.0 latest CI\r\nAndroid OS (also reproducible on iOS)", "comment": { "comments": [ { "id": "239007", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This works correctly for me if I change the line \nTi.view.setVisible(!view.getVisible()); to\nview.setVisible(!view.getVisible()); \n\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-02-20T11:37:08.000+0000", "updated": "2013-02-20T11:37:08.000+0000" }, { "id": "239230", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This works if I change the line \r\nTi.view.setVisible(!view.getVisible()); to\r\nview.setVisible(!view.getVisible()); ", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-02-21T14:24:10.000+0000", "updated": "2013-02-21T14:24:10.000+0000" }, { "id": "416392", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as I am unable to reproduce the issue using the following environment; \r\nPixel (7.1) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.8.1.201612050850 \r\nTi SDK 6.0.3 GA \r\nAppc NPM 4.2.8 \r\nAppc CLI 6.1.0 \r\nTi CLI 5.0.11 \r\nAlloy 1.9.5 \r\nArrow 1.10.1 \r\nXcode 8.2 (8C38) \r\nNode v4.6.0 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-30T21:25:03.000+0000", "updated": "2017-03-30T21:25:03.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }