{ "id": "128775", "key": "TIMOB-16833", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-12T11:59:47.000+0000", "created": "2014-04-07T21:31:31.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "blackberry", "module_button", "qe-closed-3.3.0", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-18T11:48:46.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "Why does creating 2 buttons inline like this cause the following output:\r\n\r\n[INFO] button1 type: [object TiUIButtonProxy]\r\n[INFO] button2 type: function () { [native code] }\r\n\r\n\t{code}\r\n\r\n// Create a Button.\r\n\tvar button1 = Ti.UI.createButton({\r\n\t\ttitle : 'button1',\r\n\t\theight : Ti.UI.SIZE,\r\n\t\twidth : Ti.UI.SIZE\r\n\t});\r\n\t\r\n\tTi.API.info(\"button1 type: \" + button1);\r\n\t\r\n\t// Listen for click events.\r\n\tbutton1.addEventListener('click', function() {\r\n\t\tTi.API.info('\\'button1\\' was clicked! : pre-eventListener');\r\n\t\t\r\n\t});\r\n\t\r\n\t// Add to the parent view.\r\n\tself.mainView.add(button1);\r\n\t\r\n\t// Create a Button.\r\n\tvar button2 = Ti.UI.createButton({\r\n\t\ttitle : 'button2',\r\n\t\theight : Ti.UI.SIZE,\r\n\t\twidth : Ti.UI.SIZE\r\n\t});\r\n\r\n\tTi.API.info(\"button2 type: \" + button2);\r\n\t\t\r\n\t// Listen for click events.\r\n\tbutton2.addEventListener('click', function() {\r\n\t\tTi.API.info('\\'button2\\' was clicked! : pre-eventListener');\r\n\t\t\r\n\t});\r\n\t\r\n\t// Add to the parent view.\r\n\tself.mainView.add(button2);\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "BlackBerry: Ti.UI.createButton has inconsistent results", "creator": { "name": "ssaracut", "key": "ssaracut", "displayName": "Steven Saracut", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "ssaracut", "key": "ssaracut", "displayName": "Steven Saracut", "active": true, "timeZone": "America/New_York" }, "environment": "Latest code from bb master.", "comment": { "comments": [ { "id": "300405", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is due to the way the V8 objects are created internally. For some reason it fails to add the properties sometimes. I have already found the bug, PR coming soon.\r\n\r\nThis is critical since it is very inconsistent. This code also fails in the current code:\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\nvar btn = Ti.UI.createButton();\r\nbtn.addEventListener('click',function(){\r\n\tvar file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory);\r\n\tTi.API.info(file.getDirectoryListing());\r\n});\r\nwin.open();\r\nwin.add(btn);\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-09T19:22:16.000+0000", "updated": "2014-04-09T19:22:16.000+0000" }, { "id": "300406", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pending PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/216\n\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-09T19:40:40.000+0000", "updated": "2014-04-09T19:40:40.000+0000" }, { "id": "300599", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Mauro, it broke after 3.2.2 and I just fixed it. Can you try with Master???? Thanks!\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-10T21:40:15.000+0000", "updated": "2014-04-10T21:40:15.000+0000" }, { "id": "300760", "author": { "name": "ssaracut", "key": "ssaracut", "displayName": "Steven Saracut", "active": true, "timeZone": "America/New_York" }, "body": "I pulled master and can confirm it worked for me now.", "updateAuthor": { "name": "ssaracut", "key": "ssaracut", "displayName": "Steven Saracut", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-14T01:23:28.000+0000", "updated": "2014-04-14T01:23:28.000+0000" }, { "id": "309548", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with test environment:\r\n\r\nAppcelerator-Studio:3.3.0.201406171619 \r\nSdk:3.3.0.v20140617161713\r\nacs:1.0.14\r\nalloy:1.4.0-rc\r\nnpm:1.3.2\r\ntitanium:3.3.0-rc\r\ntitanium-code-processor:1.1.1\r\nxcode:5.1.1\r\nOS:Maverick(10.9.3)\r\nDevice:Blackberry Z10\r\n\r\nWorking as expected.\r\nHence closing the issue", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-18T11:48:23.000+0000", "updated": "2014-06-18T11:48:23.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }