{ "id": "113708", "key": "AC-1952", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-05-02T17:59:02.000+0000", "created": "2013-05-02T12:56:55.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:53.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": [], "attachment": [], "flagged": false, "summary": "Custom properties in TitaniumUI components ", "creator": { "name": "jack88", "key": "jack88", "displayName": "Jacek H.", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jack88", "key": "jack88", "displayName": "Jacek H.", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.1.0, iPhone Simulator", "comment": { "comments": [ { "id": "249951", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You are not able to directly change the value of an object property, this is one caveat of using custom properties. \n\nTake for example:\n{code}\n// app.js\nmywindow.userInfo = { \n id: 1,\n name: 'John Doe',\n location: 'Neverland'\n};\nmywindow.userInfo.location = \"Wonderland\";\n\nalert(mywindow.userInfo.location); // still \"Neverland\"\n{code}\n\nYou cannot directly change the location value. In order to change it you must do:\n\n{code}\nvar userInfo = mywindow.userInfo;\nuserInfo.location = \"Wonderland\";\nmywindow.userInfo = userInfo; // set the whole modified again\n\nalert(mywindow.userInfo.location); // now \"Wonderland\" \nalert(mywindow.userInfo.name); // other properties still work\n{code}\n\nfor more information please take a look at this page:\nhttp://shikii.net/blog/custom-properties-in-titanium-windows-and-controls/\n\nIf you have any more questions, feel free to ask.\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-02T17:58:10.000+0000", "updated": "2013-05-02T17:58:10.000+0000" }, { "id": "250060", "author": { "name": "jack88", "key": "jack88", "displayName": "Jacek H.", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok, thanks for the quick response. The behavior of the custom properties is a bit strange.\r\n\r\nI found this solution to give/set references:\r\n\r\n// app.js\r\nvar userInfo = { \r\n id: 1,\r\n name: 'John Doe',\r\n location: 'Neverland'\r\n};\r\n\r\nmywindow.getUserInfo = function() {\r\n return userInfo;\r\n}\r\n\r\nmywindow.setUserInfo = function(property, value) {\r\n userInfo[property] = value;\r\n}\r\n\r\nuserInfo.location = \"Wonderland\";\r\n \r\nalert(mywindow.getUserInfo().location); // \"Wonderland\"\r\n\r\nRegards\r\nJacek\r\n", "updateAuthor": { "name": "jack88", "key": "jack88", "displayName": "Jacek H.", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-03T07:49:16.000+0000", "updated": "2013-05-03T07:49:49.000+0000" }, { "id": "286033", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as per Jacek's update.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-28T00:13:02.000+0000", "updated": "2013-12-28T00:13:02.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }