{ "id": "60914", "key": "TIMOB-282", "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": "2012-07-16T17:04:51.000+0000", "created": "2011-04-15T02:26:38.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "0.8.0", "android", "scrub-invalid" ], "versions": [], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-16T17:04:51.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": "{html}

If you create a window from a button click listener, then call\r\nTitanium.UI.currentWindow.close() from the opened window it will\r\nwork.

\r\n

But if you create a window from an menu.addItem call (and the\r\nwin object is scoped to the callback with a \"var\") you can't close\r\nthe window.

\r\n

Sample files attached here:
\r\nhttp://gist.github.com/247895

\r\n

index.html shows the bug
\r\ntest.html new window opened by index.html
\r\nworks.html shows moving the win out of the callback scope makes it\r\nwork.

\r\n

Not sure if it's a \"real\" bug or an implementation detail, but I\r\nwanted to report it.

{html}", "attachment": [], "flagged": false, "summary": "Can't close a new window when created from a menu item", "creator": { "name": "davglass", "key": "davglass", "displayName": "Dav Glass", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "davglass", "key": "davglass", "displayName": "Dav Glass", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123055", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Are there any errors in the trace level log? Most of the java\nerrors go there.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:26:38.000+0000", "updated": "2011-04-15T02:26:38.000+0000" }, { "id": "123056", "author": { "name": "davglass", "key": "davglass", "displayName": "Dav Glass", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I don't see a Java error, but from JS Titanium.UI.currentWindow\nis undefined

{html}", "updateAuthor": { "name": "davglass", "key": "davglass", "displayName": "Dav Glass", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:26:39.000+0000", "updated": "2011-04-15T02:26:39.000+0000" }, { "id": "174825", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not valid, does not reproduce in TiMOB SDK 1.7.5 as we no longer use HTML for our markup language", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-05T04:58:39.000+0000", "updated": "2011-12-05T04:58:39.000+0000" }, { "id": "207908", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No longer applicable since this was a bug in the \"old\" Titanium.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T17:04:51.000+0000", "updated": "2012-07-16T17:04:51.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }