{ "id": "99672", "key": "TIMOB-10578", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2020-09-03T13:14:34.000+0000", "created": "2012-08-23T13:38:05.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "parity" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2020-09-03T13:14:34.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Issue\r\nLooks like a property of a proxy is read only in iOS\r\n\r\nh6.Droid console output\r\n{code}\r\n[INFO][TiAPI ( 338)] Should say \"first\": first\r\n[INFO][TiAPI ( 338)] Should say \"second\": second\r\n{code}\r\n\r\nh6.iOS console output\r\n{code}\r\n[INFO] Should say \"first\": first\r\n[INFO] Should say \"second\": first\r\n{code}\r\n\r\nh6.Simple repro snippet\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar obj = {\r\n\t_data: [\r\n\t\t{one: 'one'},\r\n\t\t{two:'two'},\r\n\t\t{three:'three'},\r\n\t\t{four:'four'},\r\n\t\t{five:'five'}\r\n\t],\r\n\twidth:100,\r\n\theight: 100,\r\n\tbackgroundColor: 'red'\r\n}\r\n\r\nvar view = Ti.UI.createView({\r\n\t_data: [\r\n\t\t{one: 'one'},\r\n\t\t{two:'two'},\r\n\t\t{three:'three'},\r\n\t\t{four:'four'},\r\n\t\t{five:'five'}\r\n\t],\r\n\twidth:100,\r\n\theight: 100,\r\n\tbackgroundColor: 'red',\r\n\t_myname:[ 'first' ] // this is view._myname[0]\r\n});\r\n\r\nwin.add(view);\r\n\r\nwin.open();\r\n\r\nTi.API.info('Should say \"first\": ' + view._myname[0]);\r\nview._myname[0] = 'second';\r\nTi.API.info('Should say \"second\": ' + view._myname[0]);\r\n{code}\r\n\r\nh6.Tested on\r\niOS 5.1 simulator\r\nDroid Razr 2.3.5", "attachment": [], "flagged": false, "summary": "iOS: Property of a proxy is Read-Only", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 2.2 CI Build, 3.2.1.GA\r\n\r\niOS 5.1, 7.0", "comment": { "comments": [ { "id": "244255", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-27T08:39:42.000+0000", "updated": "2013-03-27T08:39:42.000+0000" }, { "id": "342825", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Just a comment while we look into this.\r\n\r\nA Titanium proxy is not a regular JS object. Any custom properties added to a proxy are internally copied and converted into native value, such as NSArray, for example. The values of these properties become read-only until overwritten. To solve this issue for now, do the following\r\n{code}\r\nTi.API.info('Should say \"first\": ' + view._myname[0]);\r\nvar newObject = view._myname;\r\nnewObject[0] = 'second';\r\nview._myname = newObject;\r\nTi.API.info('Should say \"second\": ' + view._myname[0]);\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-10T20:48:02.000+0000", "updated": "2015-02-10T20:48:02.000+0000" }, { "id": "456707", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Closing for cleaning up legacy tickets purpose. \r\n\r\nAs mentioned above, this is expected bevariour. Workaround\r\n\r\n{code:js}\r\nTi.API.info('Should say \"first\": ' + view._myname[0]);\r\nlet myname = view._myname;\r\nmyname[0] = \"second\";\r\nview._myname = myname;\r\nTi.API.info('Should say \"second\": ' + view._myname[0]);\r\n{code}", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-09-03T13:14:34.000+0000", "updated": "2020-09-03T13:14:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }