{ "id": "67450", "key": "TIMOB-4326", "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": [ { "id": "11359", "description": "Mobile 1.8.0 M06", "name": "Sprint 2011-27", "archived": true, "released": true, "releaseDate": "2011-07-11" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-06-22T17:33:12.000+0000", "created": "2011-06-06T11:39:59.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "14264", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "63024", "key": "TIMOB-2392", "fields": { "summary": "iOS: Drillbit regression: kroll.js", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14266", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "83914", "key": "TIMOB-6688", "fields": { "summary": "iOS: CommonJS - Module variables not updated", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T05:56:40.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": "h1. Problem\r\nIf you add an object to a window (for example, a custom property \"foo\"), only the initial value of the property is used.\r\n\r\nh2. Sample Code\r\nDrop this in an app.js and run it. No other interaction is required.\r\n\r\nThe following sample stores an object in two places -- the \"foo\" variable, and in win's \"foo\" property. The code below tests that both places are referring to the same object by doing a couple assignments. If everything goes well, an alert proclaiming: \"PASS!\" will show up. Otherwise, \"FAIL:\" will show up.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n\r\n// initialize\r\nvar foo = { bar: 'Assign1'};\r\n// store it in window\r\nwin.foo = foo;\r\n// reassign through the local object\r\nfoo.bar = 'Assign2';\r\n// and then reassign through the window property\r\nwin.foo.bar = 'Assign3';\r\n\r\n// now check the values\r\nTi.API.info('foo.bar = ' + foo.bar);\r\nTi.API.info('win.foo.bar = ' + win.foo.bar);\r\nif (foo.bar != 'Assign3') {\r\n alert('FAIL: foo.bar != \"Assign3\"');\r\n}\r\nelse if (win.foo.bar != 'Assign3') {\r\n alert('FAIL: win.foo.bar != \"Assign3\"');\r\n}\r\nelse {\r\n alert('PASS: All assignments looked good.');\r\n}\r\n{code}\r\n\r\nh2. Expected Behavior\r\nSince we're dealing with a single object, and storing it in two locations, we should be able to change its properties in any of the places the reference is stored and get the updated value out.\r\n\r\nh2. Tested On\r\nSee \"Environment\".\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-744341", "attachment": [], "flagged": false, "summary": "iOS: Inconsistent Object Access on Windows", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK version: 1.8.0 (06/06/11 13:05 03c3608)\r\nWORKS on Android EPIC 4G 2.2\r\nBROKEN on iPhone Simulator 4.3", "comment": { "comments": [ { "id": "157602", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of 2392. The issue is that proxy accessors are copy on read and copy on write (due to the nature of proxies storing properties in Objective C, not JS). As mentioned there, fixing will involve deep changes and possibly removing multi-contexts for JS. Very nontrivial.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-22T17:33:12.000+0000", "updated": "2011-06-22T17:33:12.000+0000" }, { "id": "408762", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing issue due to time passed and irrelevance of the ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T05:56:40.000+0000", "updated": "2017-03-03T05:56:40.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }