{ "id": "176139", "key": "TIMOB-28407", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": [ { "id": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-04-08T19:38:07.000+0000", "created": "2021-03-30T13:23:06.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "59250", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "176136", "key": "TIMOB-28404", "fields": { "summary": "iOS: tabGroup.setActiveTab() and text.setSelection() shows an error ", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2021-05-03T18:14:20.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": [], "description": "h5.Description\r\n\r\nIn the linked ticket there was some inconsistencies around setters that existed on one platform but not the other, but were documented to exist on both. In order to make sure we're clean, I took a look through the JSCA file to try and see if there were anymore that existed here. My criteria was (script attached)\r\n\r\n* Have to be under Titanium namespace (but not XML)\r\n* Are not deprecated already\r\n* Have a corresponding read-write property\r\n* Getter has 0 arguments, setter has 1 argument\r\n\r\nThis gave me the below potential problematic APIs\r\n\r\n{code}\r\n{\r\n \"getters\": [\r\n {\r\n \"function\": \"getTabs\",\r\n \"parent\": \"Titanium.UI.TabGroup\"\r\n }\r\n ],\r\n \"setters\": [\r\n {\r\n \"function\": \"setCheckable\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"setChecked\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"setEnabled\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"setVisible\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"setTimeout\",\r\n \"parent\": \"Titanium.Network.HTTPClient\"\r\n },\r\n {\r\n \"function\": \"setWindow\",\r\n \"parent\": \"Titanium.UI.Tab\"\r\n },\r\n {\r\n \"function\": \"setHeaderPullView\",\r\n \"parent\": \"Titanium.UI.TableView\"\r\n }\r\n ],\r\n \"isers\": [\r\n {\r\n \"function\": \"isCheckable\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"isChecked\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"isEnabled\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"isVisible\",\r\n \"parent\": \"Titanium.Android.MenuItem\"\r\n },\r\n {\r\n \"function\": \"isSupported\",\r\n \"parent\": \"Titanium.App.iOS.UserActivity\"\r\n },\r\n {\r\n \"function\": \"isLooping\",\r\n \"parent\": \"Titanium.Media.Sound\"\r\n },\r\n {\r\n \"function\": \"isPaused\",\r\n \"parent\": \"Titanium.Media.Sound\"\r\n }\r\n ]\r\n}\r\n{code}\r\n\r\nIf these are incorrectly documented they need the same treatment as this commit https://github.com/appcelerator/titanium_mobile/commit/580cffc90d27d5b21d5fbb9de34bc9bb73f923a7", "attachment": [ { "id": "67865", "filename": "cat.mp3", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-04-07T12:20:29.000+0000", "size": 23822, "mimeType": "audio/mpeg" }, { "id": "67860", "filename": "setters-getters-finder.js", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-03-30T16:32:23.000+0000", "size": 1372, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Review possible incorrectly documented setter/getter functions", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": null, "closedSprints": [ { "id": 1221, "state": "closed", "name": "2021 Sprint 7", "startDate": "2021-03-29T19:18:00.000Z", "endDate": "2021-04-09T19:18:00.000Z", "completeDate": "2021-04-12T21:26:15.427Z", "originBoardId": 114 }, { "id": 1222, "state": "closed", "name": "2021 Sprint 8", "startDate": "2021-04-12T21:26:41.532Z", "endDate": "2021-04-23T21:26:00.000Z", "completeDate": "2021-04-28T15:13:56.824Z", "originBoardId": 114 }, { "id": 1223, "state": "closed", "name": "2021 Sprint 9", "startDate": "2021-04-26T15:14:42.215Z", "endDate": "2021-05-07T15:14:00.000Z", "completeDate": "2021-05-17T16:30:45.852Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "458496", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This may also apply to some of the \"is\" APIs?\r\n\r\nEdit: yes it does, updated list and script", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-03-30T13:33:49.000+0000", "updated": "2021-03-30T16:31:56.000+0000" }, { "id": "458497", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "* TabGroup.getTabs - done in https://github.com/appcelerator/titanium_mobile/commit/580cffc90d27d5b21d5fbb9de34bc9bb73f923a7\r\n* MenuItem.setCheckable (Android only) - Does not exist\r\n* MenuItem.setChecked (Android only) - Does not exist\r\n* MenuItem.setEnabled (Android only) - Does not exist\r\n* MenuItem. setVisible (Android only)- Does not exist\r\n* HTTPClient.setTimeout - Does not exist on either platform\r\n* Tab.setWindow - exists on Android, does not exist on iOS\r\n* TableView.setHeaderPullView (iOS only) - Does not exist\r\n\r\nOnly one that isn't clearcut (i.e. it's obvious the docs are invalid) is Tab.setWindow, I think this is the same as in https://github.com/appcelerator/titanium_mobile/pull/12661 and should be reworked? Everything else is clearcut and should be marked as deprecated/removed in 10", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-03-30T13:55:21.000+0000", "updated": "2021-03-30T13:55:21.000+0000" }, { "id": "458500", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "* MenuItem.isCheckable (Android only) - Does not exist\r\n* MenuItem.isChecked (Android only) - Does not exist\r\n* MenuItem.isEnabled (Android only) - Does not exist\r\n* MenuItem.isVisible (Android only)- Does not exist\r\n* UserActivity.isSupported (iOS only) - Exists is valid per TIMOB-19510\r\n* Sound.isLooping - Does not exist on Android, exists on iOS\r\n* Sound.isPlaying - Does not exist on Android, exists on iOS", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-03-30T16:57:15.000+0000", "updated": "2021-03-30T16:57:15.000+0000" }, { "id": "458501", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "I think the read-write should only be applicable for setter methods, get/is should probably only look for if a property exists, which adds the following:\r\n\r\n* Intent.getData (Android only) - Does not exist\r\n* HTTPClient.getAllResponseHeaders - Exists on both platforms\r\n* MenuItem.isActionViewExpanded (Android only) - Does not exist\r\n* ResultSet.isValidRow - Exists on both platforms\r\n* Sound.isPaused - Does not exist on Android, exists on iOS ", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-03-30T17:02:24.000+0000", "updated": "2021-03-30T17:16:09.000+0000" }, { "id": "458502", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "PR for comments: https://github.com/appcelerator/titanium_mobile/pull/12677\r\n\r\nNot marking for review as there is technically work to be done still, I just want opinions on what that work should be:\r\n\r\n* Remove the APIs fully now across both platforms\r\n* Mark as removed/deprecated on the right platform, and only deprecate on the platform with a view to remove properly in future\r\n\r\n\r\ncc [~cwilliams] [~jquick] [~vijaysingh] [~gmathews] whatcha thinking?", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-03-30T17:32:20.000+0000", "updated": "2021-03-30T17:32:20.000+0000" }, { "id": "458534", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Test case (requires the attached {{cat.mp3}} file in the Resources directory)\r\n\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n fullscreen: false\r\n});\r\n\r\nwin1.addEventListener('click', () => {\r\n const sound = Ti.Media.createSound({ url: 'cat.mp3'});\r\n console.log(sound.isLooping());\r\n console.log(sound.isPlaying());\r\n console.log(sound.isPaused());\r\n})\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n title: 'Tab 1'\r\n});\r\n\r\nif (OS_ANDROID) {\r\n tab1.setWindow(win1);\r\n} else {\r\n tab1.window = win1;\r\n}\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor: 'yellow'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n window: win2,\r\n title: 'Tab 2'\r\n});\r\n\r\nvar tabGroup = Ti.UI.createTabGroup({\r\n activity: {\r\n onCreateOptionsMenu: function(e) {\r\n var menu = e.menu;\r\n var menuItem = menu.add({\r\n title : \"Item 1\",\r\n itemId: 1\r\n });\r\n console.log(menuItem.isActionViewExpanded());\r\n console.log(menuItem.isCheckable());\r\n console.log(menuItem.isChecked());\r\n console.log(menuItem.isEnabled());\r\n console.log(menuItem.isVisible());\r\n\r\n }\r\n }\r\n});\r\n \r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-04-07T12:20:05.000+0000", "updated": "2021-04-07T12:20:05.000+0000" }, { "id": "458554", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/12692", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-04-08T19:37:57.000+0000", "updated": "2021-04-08T19:37:57.000+0000" }, { "id": "458555", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master and 10_0_X branches", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-04-08T19:38:19.000+0000", "updated": "2021-04-08T19:38:19.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }