{ "id": "65303", "key": "TIMOB-4074", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-24T14:35:12.000+0000", "created": "2011-05-13T11:05:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "KitchenSink" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-24T14:35:12.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": "Description:\nWhile running KS, Platform>Passing Data (windows), the view came up empty and the console reported errors:\nFri May 13 09:59:44 unknown UIKitApplication:com.appcelerator.pushtest[0x93b2][5058] : [ERROR] Script Error = Result of expression 'win.myFunc' [undefined] is not a function. at custom_properties_2.js (line 1).\nFri May 13 09:59:44 unknown UIKitApplication:com.appcelerator.pushtest[0x93b2][5058] : [ERROR] application received error: Result of expression 'win.myFunc' [undefined] is not a function. at custom_properties_2.js (line 1)\n\nSteps to reproduce:\n1) Install KS\n2) navigate to Platform>Passing Data (windows)\n3) Click \"launch window\"\n\nResult:\nEmpty page and console errors\n\nExpected result:\n\nNotes:\nDoes not occur on 1.6.2", "attachment": [ { "id": "18550", "filename": "app.js", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-23T15:10:02.000+0000", "size": 564, "mimeType": "application/x-javascript" }, { "id": "18521", "filename": "app.js", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-19T09:55:45.000+0000", "size": 523, "mimeType": "application/x-javascript" }, { "id": "18551", "filename": "com.test.js", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-23T15:10:02.000+0000", "size": 77, "mimeType": "application/x-javascript" }, { "id": "18552", "filename": "opening.js", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-23T15:10:02.000+0000", "size": 230, "mimeType": "application/x-javascript" }, { "id": "18522", "filename": "opening.js", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-19T09:55:45.000+0000", "size": 139, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: KitchenSink reports script error when running Platform>Passing Data (windows)", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iPhone4 Verizon (4.2.6), Titanium SDK version:(1.7.0.e6afca8...), Titanium Studio, build: 1.0.0.201105111905", "comment": { "comments": [ { "id": "133953", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested iPad (Universal KS)/4.3.3.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-18T17:19:17.000+0000", "updated": "2011-05-18T17:19:17.000+0000" }, { "id": "133960", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Have to let Blain log his hours!", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-18T17:28:17.000+0000", "updated": "2011-05-18T17:28:17.000+0000" }, { "id": "133961", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Forgot to log the hours before it got closed. Whoops.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-18T17:29:54.000+0000", "updated": "2011-05-18T17:29:54.000+0000" }, { "id": "133962", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Blain logged work, can close now for reals.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-18T17:30:53.000+0000", "updated": "2011-05-18T17:30:53.000+0000" }, { "id": "133991", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue found by the community: https://github.com/appcelerator/titanium_mobile/commit/7bef2bd0bcb7abbded1b9cccbbd187ee056788d7#commitcomment-390894", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-19T09:54:05.000+0000", "updated": "2011-05-19T09:54:05.000+0000" }, { "id": "134021", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Turns out that contexts sharing functions leads to all sorts of crazy threading issues, and may have been a cause of crashers in the past. As a workaround, eventListeners ARE threadsafe, and while Ti.App event listeners have an issue with native items (TIMOB-4155) event listeners on native items work. For example, the workaround for the example provided would be thusly:\n\n{{\nApp.js:\n\n\nvar win = Ti.UI.createWindow();\nvar b = Ti.UI.createButton({\n\ttitle:'Open',\n\twidth:140,\n\theight:40\n});\nwin.add(b);\nb.addEventListener('click', function() {\n\tvar w = Ti.UI.createWindow({\n\t\turl:'opening.js'\n\t});\n\n\tw.addEventListener('rotateLeft',function (e){\n\t\tvar the_view = e.view;\n\t\tvar angle = e.angle;\n\t\tvar duration=e.duration;\n\t\n\t\tif(the_view==null || the_view==undefined){\n\t\t\treturn;\n\t\t}\n\t\tvar t = Ti.UI.create2DMatrix();\n\t\tt = t.rotate(angle);\n\t\tvar a = Titanium.UI.createAnimation();\n\t\ta.transform = t;\n\t\ta.duration = duration;\n\t\tthe_view.animate(a);\n\t});\n\n\tw.open();\n});\nwin.open();\n\nopening.js:\n\n\nvar win = Ti.UI.currentWindow;\nvar v = Ti.UI.createView({backgroundColor:'red', width:100, height:100});\nwin.add(v);\n\nwin.fireEvent('rotateLeft',{view:v,angle:45,duration:0.2});\n\n}}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-19T17:52:29.000+0000", "updated": "2011-05-19T17:52:29.000+0000" }, { "id": "134121", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To be bug-compatible, when a proxy is being made in the wrong context, we register in the current context just to ensure it's still out and about.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-23T15:17:12.000+0000", "updated": "2011-05-23T15:17:12.000+0000" }, { "id": "134173", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with iPad 3.2.3 and iPad 4.3, Titanium Studio, build: 1.0.0.201105131803, Titanium SDK version: 1.7.X r3982f4e7.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-24T14:35:12.000+0000", "updated": "2011-05-24T14:35:12.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }