{ "id": "167529", "key": "AC-4954", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-05-10T12:20:20.000+0000", "created": "2017-05-09T20:14:45.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-10T12:20:20.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "15000", "name": "Hyperloop" }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "If I set \r\n{code:java}\r\ntrue\r\n{code}\r\n in tiapp.xml then the 'postlayout' event of any view is not fired.\r\n\r\nAn alloy test case may be index.js:\r\n{code:java}\r\n$.win.addEventListener('open', function(e){\r\n console.log(e);\r\n});\r\n$.viewContent.addEventListener('postlayout', function(e){\r\n console.log('viewContent');\r\n console.log(e);\r\n});\r\n$.label.addEventListener('postlayout', function(e){\r\n console.log('label');\r\n console.log(e);\r\n});\r\n$.win.addEventListener('postlayout', function(e){\r\n console.log(e);\r\n});\r\n$.win.open();\r\n{code}\r\n\r\nindex.xml:\r\n{code:java}\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nExpected result when preperty set to TRUE: view all the events log in the console.\r\nWhat's happening: only the \"open\" event is fired.\r\nIf I set the property to FALSE, then all the events are logged.\r\n\r\nThis happens with 6.0.4.GA and 6.0.2.GA. I have tested this with sdk 6.1.0.v20170508081747 and works as expected (all events are fired).", "attachment": [], "flagged": false, "summary": "'postlayout' event not fired when property \"run-on-main-thread\" is set to true", "creator": { "name": "inzori", "key": "inzori", "displayName": "Fabian Martinez", "active": true, "timeZone": "America/Montevideo" }, "subtasks": [], "reporter": { "name": "inzori", "key": "inzori", "displayName": "Fabian Martinez", "active": true, "timeZone": "America/Montevideo" }, "environment": "MacOS 10.12.4 - XCode 8.3.2 - Ti SDK 6.0.4.GA - Hyperloop 2.1.0 - iOS10.3", "comment": { "comments": [ { "id": "419415", "author": { "name": "inzori", "key": "inzori", "displayName": "Fabian Martinez", "active": true, "timeZone": "America/Montevideo" }, "body": "The same happens with classic app (non Alloy), Hyperloop enabled, 6.0.4.GA, iOS (iphone7 10.3 emulator).\r\nIf I create a new project and app.js is: \r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({title: 'title', backgroundColor: '#fff' });\r\nvar label = Ti.UI.createLabel({ text: 'message', color: \"#333\"});\r\nwin.add(label);\r\nwin.addEventListener('open', function(e){\r\n console.log(e);\r\n});\r\nwin.addEventListener('postlayout', function(e){\r\n console.log(e);\r\n});\r\nwin.open();\r\n{code}\r\n\r\nthen the console log is:\r\n{code:java}\r\n[INFO] : TestProject2/1.0 (6.0.4.74f7d21)\r\n[TRACE] : [HYPERLOOP] willStartNewContext \r\n[INFO] : {\r\n[INFO] : bubbles = 0;\r\n[INFO] : cancelBubble = 0;\r\n[INFO] : source = \"[object TiUIWindow]\";\r\n[INFO] : type = open;\r\n[INFO] : }\r\n[TRACE] : [HYPERLOOP] didStartNewContext \r\n[TRACE] : Uploaded tiapp metadata with Appcelerator Platform!\r\n{code}\r\n\r\nif I switch to 6.1.0.v20170508081747 and recompile, the console log is:\r\n{code:java}\r\n[INFO] : TestProject2/1.0 (6.1.0.77cc59d)\r\n[TRACE] : [HYPERLOOP] willStartNewContext \r\n[INFO] : {\r\n[INFO] : bubbles = 0;\r\n[INFO] : cancelBubble = 0;\r\n[INFO] : source = \"[object TiUIWindow]\";\r\n[INFO] : type = open;\r\n[INFO] : }\r\n[DEBUG] : Application booted in 191.500962 ms\r\n[TRACE] : [HYPERLOOP] didStartNewContext \r\n[INFO] : {\r\n[INFO] : bubbles = 0;\r\n[INFO] : cancelBubble = 0;\r\n[INFO] : source = \"[object TiUIWindow]\";\r\n[INFO] : type = postlayout;\r\n[INFO] : }\r\n[TRACE] : updating tiapp metadata with Appcelerator Platform...\r\n[TRACE] : Uploaded tiapp metadata with Appcelerator Platform!\r\n{code}\r\n", "updateAuthor": { "name": "inzori", "key": "inzori", "displayName": "Fabian Martinez", "active": true, "timeZone": "America/Montevideo" }, "created": "2017-05-09T21:29:20.000+0000", "updated": "2017-05-09T21:32:39.000+0000" }, { "id": "419445", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey there, I remember we fixed this for 6.1.0, but 6.0.x was already out of the house. Release 6.1.0 is expected to be released around end of this month, you can already use the latest build from [here|http://builds.appcelerator.com/#6_1_X], I hope that helps!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-10T07:22:51.000+0000", "updated": "2017-05-10T07:22:51.000+0000" }, { "id": "419459", "author": { "name": "inzori", "key": "inzori", "displayName": "Fabian Martinez", "active": true, "timeZone": "America/Montevideo" }, "body": "Thank you for your response.\r\nIs there a release notes draft available to check what the build fixes?\r\n", "updateAuthor": { "name": "inzori", "key": "inzori", "displayName": "Fabian Martinez", "active": true, "timeZone": "America/Montevideo" }, "created": "2017-05-10T12:10:42.000+0000", "updated": "2017-05-10T12:10:42.000+0000" }, { "id": "419461", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-10T12:20:16.000+0000", "updated": "2017-05-10T12:20:16.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }