{ "id": "98422", "key": "AC-3213", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-07-31T10:14:03.000+0000", "created": "2012-07-31T10:02:09.000+0000", "labels": [ "event", "ios", "properties" ], "versions": [], "issuelinks": [ { "id": "19530", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "98042", "key": "TIMOB-10314", "fields": { "summary": "iOS: Ti.App.Properties 'change' event", "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 } } } }, { "id": "19532", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "98423", "key": "TIMOB-10260", "fields": { "summary": "Android: Ti.App.Properties 'change' event parity for Android", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "19537", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "98424", "key": "TIMOB-10261", "fields": { "summary": "Ti.App.Properties 'change' event parity for Mobile Web", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:57:37.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "added a \"change\" event to Ti.App.Properties to listen for changes of Properties\r\nThe test case comes with a settings.bundle in attachment which allows to really test that feature.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n\r\nvar info = Ti.UI.createLabel();\r\nwin.add(info);\r\n\r\nvar switchButton = Ti.UI.createSwitch({\r\n top:40,\r\n value:Ti.App.Properties.getBool('test') // mandatory property for iOS \r\n});\r\nswitchButton.addEventListener('change',function(_event){\r\n Ti.App.Properties.setBool('test', _event.value);\r\n});\r\nwin.add(switchButton);\r\n\r\nfunction onPropertiesChange()\r\n{\r\n switchButton.value = Ti.App.Properties.getBool('test');\r\n info.text = 'onPropertiesChange';\r\n Ti.API.info('onPropertiesChange')\r\n setTimeout(function(){info.text = '';}, 1000);\r\n}\r\n \r\nTi.App.Properties.addEventListener('change',onPropertiesChange);\r\n\r\nwin.addEventListener('close', function() {\r\n Ti.App.Properties.removeEventListener('change',onPropertiesChange);\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "30170", "filename": "test.zip", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-31T10:02:10.000+0000", "size": 9093, "mimeType": "application/zip" } ], "flagged": false, "summary": "Ti.App.Properties 'change' event parity for Android", "creator": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium 2.2.0 (master)\r\nios 5.1", "comment": { "comments": [ { "id": "210710", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving issue into TIMOB-10260", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-31T10:14:03.000+0000", "updated": "2012-07-31T10:14:03.000+0000" }, { "id": "286617", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-03T20:12:58.000+0000", "updated": "2014-01-03T20:12:58.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }