{ "id": "63690", "key": "TIMOB-3058", "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": "11242", "name": "Release 1.6.0 M09", "archived": true, "released": true, "releaseDate": "2011-02-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:00:48.000+0000", "created": "2011-04-15T03:35:46.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "lifecycle_refactor", "regression", "release-1.6.0", "reported-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T02:00:48.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}

The fail case is the KS -> Controls -> Slider ->\nMin/Max Range test. When you run it, you only see a black\nwindow.

\n

It's a very strangely written test, and I'm pretty sure it's\nactually a mistake (the way it's written). (Nevertheless, it should\n-- and did -- work.)

\n

It's strange because when you tap the row to start the test, it\nopens a new window (as do basically all of our KS tests) using\ntabgroup.open(win) (thus that new window is heavy). That window has\nits own url property. And in the JS of that URL, a second window\n(light) is created and opened in order to display the test. (This\nsecond window is obviously totally unnecessary, but anyway...)

\n

The reason we see a blank window is because it's the heavy\nwindow that is showing. (The JS for the heavy window does not\ncontain any code that puts a view on the window.) The lightweight\nwindow never gets seen. And we can see why in this screen shot of\nsome logcat output that I've annotated:

\n

https://skitch.com/billdawson/rpdeu/projects-grep-137x29

\n

So when the lightweight window starts opening, the heavyweight\nwindow hasn't finished opening yet (obviously, since part of the\ncode running when the heavyweight window opens is to open the\nlightweight window.) And when a lightweight window is created\n(constructor of TiUIWindow), it immediately runs\nthrough handleWindowCreated and\nhandleBooted, thus putting out its layout right away.\nMeanwhile the heavyweight window has to wait until its\nhandleBooted gets called. When it does, the\nheavyweight window puts its layout on the\nactivity, thus hiding the lightweight window's layout.

\n

So the test is bizarre and probably should be changed. But the\nuse case of having a heavy open a light immediately is perhaps\nvalid. Like maybe the heavy's code checks some condition and if it\nexists they want to popup a light window for a second to display an\nelaborate message with an OK button that closes the light so its\nre-shows the heavy.

\n

'N' stuff, and yeah but no but yeah but no.

{html}", "attachment": [], "flagged": false, "summary": "Android: If heavyweight window's JS code immediately opens a lightweight window, lightweight window is never seen", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "129958", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [1e82b2497cc81acafb60841154e3ba1e82744677])\n[#3058 state:fixed-in-qa] in\nTiBaseActivity.onCreate, set the window handler so that any\nlightweight windows drawn in heavyweight window's JS will be\nvisible. \nhttps://github.com/appcelerator/titanium_mobile/commit/1e82b2497cc8...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:35:47.000+0000", "updated": "2011-04-15T03:35:47.000+0000" }, { "id": "129959", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.6.0 (02/08/11\n20:55 bd9d124...) galaxy tab (2.2.2) G1 (1.6) Nexus S (2.3) sim\n2.1

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:35:47.000+0000", "updated": "2011-04-15T03:35:47.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }