{ "id": "116357", "key": "TIMOB-14347", "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": "15111", "description": "2013 Sprint 13", "name": "2013 Sprint 13", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-07-26T02:45:00.000+0000", "created": "2013-06-21T23:38:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.1.2", "qe-nfc", "sdk-bb" ], "versions": [], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:27.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": "Note: This issue is seen only for buttons. Views & Labels work fine\r\n\r\nDescription:\r\n==============\r\n1. Create an app with the following code:\r\n\r\nFOR BUTTON:\r\n================\r\n{code}\r\nvar win = Ti.UI.createWindow({});\r\n \r\nvar view = Ti.UI.createView({\r\n\tbackgroundColor:'green',\r\n height:200,\r\n width:200,\r\n layout:'horizontal'\r\n \r\n});\r\n\r\nwin.add(view);\r\n \r\nvar v1 = Ti.UI.createButton({\r\n\t //backgroundColor:'blue',\r\n \ttitle:'button 1',\r\n height:30,\r\n left:5,\r\n width:Ti.UI.SIZE,\r\n top:80\r\n});\r\n \r\nview.add(v1);\r\n \r\nvar v2 = Ti.UI.createButton({\r\n \t//backgroundColor:'red',\r\n \ttitle:'button 2',\r\n height:30,\r\n left:5,\r\n width:Ti.UI.SIZE,\r\n top:80\r\n});\r\n \r\nview.add(v2);\r\n \r\nvar v3 = Ti.UI.createButton({\r\n \t//backgroundColor:'black',\r\n \ttitle:'button 1',\r\n height:30,\r\n left:5,\r\n width:Ti.UI.SIZE,\r\n top:80\r\n});\r\n \r\nview.add(v3);\r\n \r\n \r\nwin.open();\r\n{code}\r\n\r\n2. Build & run for BB device/simulator\r\n3. Observe after app launches\r\n\r\nActual Result:\r\n===============\r\n1. The app exits immediately after launch\r\n\r\nExpected Result:\r\n=================\r\n1. The app should run & we should see the views & buttons in horizontal layout\r\n", "attachment": [ { "id": "41053", "filename": "SyntaxError.tiff", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T02:01:38.000+0000", "size": 74404, "mimeType": "image/tiff" } ], "flagged": false, "summary": "BlackBerry : Buttons with width as Ti.UI.SIZE on a view with horizontal layout exits the app on launch", "creator": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Environment:\r\nTi Studio : 3.1.1.201306112235\r\nTi BB SDK : 3.1.2.v20130619101604\r\nMac OSX : 10.8.4\r\nAlloy : 1.1.3\r\nCLI - 3.1.1\r\nwin 7 \r\nWin 8 \r\nZ10 BB simulator : 10.0.10.822\r\nZ10 device running 10.0.10.88", "comment": { "comments": [ { "id": "259267", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test to see the horizontal layout move control to next line:\n\nvar win = Ti.UI.createWindow({});\n \nvar view = Ti.UI.createView({\n backgroundColor:'green',\n // height:200,\n width:200,\n layout:'horizontal'\n \n});\n \nwin.add(view);\n \nvar v1 = Ti.UI.createButton({\n //backgroundColor:'blue',\n title:'button 1',\n //height:30,\n left:5,\n width:Ti.UI.SIZE,\n top:80\n});\n \nview.add(v1);\n \nvar v2 = Ti.UI.createButton({\n //backgroundColor:'red',\n title:'button 2',\n //height:30,\n left:5,\n width:Ti.UI.SIZE,\n top:80\n});\n \nview.add(v2);\n \nvar v3 = Ti.UI.createButton({\n //backgroundColor:'black',\n title:'button 3',\n //height:30,\n left:5,\n width:Ti.UI.SIZE,\n top:80\n});\n \nview.add(v3);\n \n \nwin.open();", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-24T21:51:31.000+0000", "updated": "2013-06-24T21:51:31.000+0000" }, { "id": "262421", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening, The app now not crashes but also is not working as expected. \r\n\r\nButton with Ti.UI.SIZE when used inside view with layout:horizontal only the last button is view on screen. \r\n\r\nWhere as when we restrict width of the button,suppose width:30(button width) inside view with layout horizontal. It works well.\r\n\r\nCode used is:\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({});\r\n \r\nvar view = Ti.UI.createView({\r\n backgroundColor:'green',\r\n height:Ti.UI.FILL,\r\n width:Ti.UI.FILL,\r\n layout:'horizontal'\r\n \r\n});\r\n \r\nvar btn1 = Ti.UI.createButton({\r\n title:'button 1',\r\n height:30, \r\n width:Ti.UI.SIZE\r\n \r\n});\r\n \r\nvar btn2 = Ti.UI.createButton({\r\n title:'button 2',\r\n height:30,\r\n width:Ti.UI.SIZE \r\n});\r\n \r\nvar btn3 = Ti.UI.createButton({\r\n title:'button 3',\r\n height:30,\r\n width:Ti.UI.SIZE \r\n});\r\nview.add(btn1);\r\nview.add(bnt2); \r\nview.add(btn3);\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\nIn the same code when all the three button's width changed as width:'30' is working fine.\r\n\r\n\r\nVerified with Environment:\r\n\r\nStudio: 3.1.2.201307171817\r\nTitanium SDK:3.1.2.v20130718094558\r\nacs:1.0.3\r\nalloy:1.1.3\r\nnpm:1.3.2\r\ntitanium:3.1.1\r\ntitanium-code-processor:1.0.1\r\nOS: OSX 10.8\r\nDevice:Blackberry-Z10(v 10.0.10.261),ios Simulator(v6.0),Galaxy Nexus(v4.0.4)\r\nXcode: 4.5.1\r\nblackberry SDK: 10.1.0.1020\r\n\r\n", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-19T07:02:18.000+0000", "updated": "2013-07-19T07:02:18.000+0000" }, { "id": "263309", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test the code and recent layout changes have solved the problem.", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T01:22:01.000+0000", "updated": "2013-07-26T01:22:01.000+0000" }, { "id": "263334", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "oops I was running the above sample code, but on using the test code there is a JavaScript syntax error (see attachment)", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T02:00:35.000+0000", "updated": "2013-07-26T02:00:35.000+0000" }, { "id": "263346", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This seems to have been fixed. Cannot reproduce.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T02:45:00.000+0000", "updated": "2013-07-26T02:45:00.000+0000" }, { "id": "266037", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. The app does not crash & we see the layout of the buttons as expected i.e if they do not fit horizontally it moves to the next line.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.1.2.201308082014\r\nTi SDK : 3.1.2.v20130809141556\r\nMac OSX : 10.8.4\r\nAlloy : 1.2.0-alpha6\r\nCLI - 3.1.2-alpha\r\nwin 7 \r\nWin 8 \r\nZ10 BB simulator : 10.0.10.822\r\nZ10 device running 10.0.10.88\r\n\r\nQ10 Simulator : 10.1.0.1720\r\nQ10 Dev alpha C device running 10.1.0.138", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-12T20:37:03.000+0000", "updated": "2013-08-12T20:37:03.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }