{ "id": "65763", "key": "TIMOB-4217", "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": "2017-06-05T21:33:36.000+0000", "created": "2011-05-25T07:38:19.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "10607", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "65424", "key": "TIMOB-4216", "fields": { "summary": "window doesn't assign custom functions", "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 } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-05T21:33:36.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "After creating a new window and opening it, functions assigned to the window return undefined. Properties work as expected.\n\nExample:\n\n{code:lang=javascript|title=app.js}\nvar win = Titanium.UI.createWindow({\n\turl: 'foo.js',\n\ttitle: 'Foo',\n\tcustomFunction: function() {\n\t\tTi.API.info(\"customFunction executed!\");\n\t},\n\tcustomProperty: 'Property returned!'\n});\n\nwin.open();\n{code}\n\n{code:lang=javascript|title=foo.js}\nvar currentWindow = Titanium.UI.currentWindow;\n\nTi.API.info('currentWindow.customFunction() = ' + currentWindow.customFunction());\nTi.API.info('currentWindow.customProperty = ' + currentWindow.customProperty);\n{code}\n\n{code:lang=none|title=catlog output}\nKrollContext D (kroll$1: app://app.js) [199,480] Running evaluated script: file:///android_asset/Resources/app.js\nKrollContext D (kroll$2: app://foo.js) [205,685] Running evaluated script: app://foo.js\nTiAPI I (kroll$2: app://foo.js) [16,701] customFunction executed!\nTiAPI I (kroll$2: app://foo.js) [1,702] currentWindow.customFunction() = undefined\nTiAPI I (kroll$2: app://foo.js) [5,707] currentWindow.customProperty = Property returned!\n{code}\n", "attachment": [], "flagged": false, "summary": "Window doesn't assign custom functions", "creator": { "name": "phx_", "key": "phx_", "displayName": "Simon Lipke", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "Android 2.2, Titanium 1.6.3 (2011/05/06 13:58 7b34a7...)\nAndroid 2.2, Titanium 1.7.0 (2011/05/18 14:34 87fe3f...)", "comment": { "comments": [ { "id": "421030", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and lack of progress over the past few years.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-05T21:33:36.000+0000", "updated": "2017-06-05T21:33:36.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }