{ "id": "115982", "key": "TIMOB-14248", "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": "15117", "description": "2013 Sprint 12 BB", "name": "2013 Sprint 12 BB", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15110", "description": "2013 Sprint 12", "name": "2013 Sprint 12", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-15T05:13:08.000+0000", "created": "2013-06-14T22:06:24.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_layout", "qe-3.1.1", "qe-testadded", "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-08-28T17:41:23.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": "This is a regression.\r\n\r\nDescription:\r\n1. Build an app for BB with the following code:\r\n{code}\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar exit1 = Ti.UI.createButton({\r\n\ttitle:'Exit',\r\n\ttop:'50%',\r\n\tleft:'0%',\r\n\theight:'10%',\r\n\twidth:'30%'\r\n});\r\n\r\nvar win1back = Ti.UI.createButton({\r\n\ttitle:'<-----',\r\n\ttop:'50%',\r\n\tleft:'30%',\r\n\theight:'10%',\r\n\twidth:'35%'\r\n});\r\n\r\n\r\nvar forward1 = Ti.UI.createButton({\r\n\ttitle:'----->',\r\n\ttop:'50%',\r\n\tleft:'65%',\r\n\theight:'10%',\r\n\twidth:'35%'\r\n});\r\n\r\nwin.add(exit1);\r\nwin.add(win1back);\r\nwin.add(forward1);\r\n\r\nwin.open();\r\n{code}\r\n\r\n2. Build & run the app for BB simulator/device\r\n3. On app launch notice the three buttons\r\n\r\nActual Result:\r\n1. The buttons over lap each other & are displayed as Ti.UI.SIZE & not according to the dimensions specified.\r\n2. The dimensions not respected are in both in absolute or percent format\r\n\r\nExpected Result:\r\n1. The buttons should respect specified dimensions & not default to SIZE", "attachment": [], "flagged": false, "summary": "BlackBerry : Buttons are displayed as Ti.UI.SIZE even though dimensions are specified in the code", "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.1.v20130613185544\r\nMac OSX : 10.8.3\r\nAlloy : 1.1.3-cr\r\nCLI - 3.1.1-cr\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": "258072", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Merged into master\r\n\r\nTest code\r\n{code}\r\nfunction Log(str) {\r\n Ti.API.info(str);\r\n}\r\nvar Test = [];\r\n// 1\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n height: Ti.UI.SIZE\r\n });\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n height: Ti.UI.SIZE,\r\n top: 10,\r\n bottom: 10\r\n });\r\n\r\n view.add(label);\r\n win.add(view);\r\n Log('====================================');\r\n Log('Test #1');\r\n Log('You should see:');\r\n Log('Blue view width FILL and height the same as label plus 5 on top and bottom');\r\n Log('Label width SIZE and height SIZE inside blue view');\r\n Log('====================================');\r\n return win;\r\n});\r\n// 2\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n height: Ti.UI.SIZE\r\n });\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n top: 10,\r\n bottom: 10\r\n });\r\n\r\n view.add(label);\r\n win.add(view);\r\n\r\n Log('====================================');\r\n Log('Test #2');\r\n Log('You should see:');\r\n Log('Blue view width FILL and height FILL');\r\n Log('Label width SIZE margin of 10 on top and bottom of blue view');\r\n Log('====================================');\r\n\r\n return win;\r\n});\r\n// 3\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n width: Ti.UI.SIZE,\r\n });\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n width: Ti.UI.SIZE,\r\n left: 5, right: 5\r\n });\r\n\r\n view.add(label);\r\n win.add(view);\r\n\r\n Log('====================================');\r\n Log('Test #3');\r\n Log('You should see:');\r\n Log('Blue view width SIZE and height FILL');\r\n Log('Width of blue view should be the width of the label plus 5 on each side')\r\n Log('Label width SIZE margin of 5 on left and right of blue view');\r\n Log('====================================');\r\n\r\n return win;\r\n});\r\n// 4\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n right: 10,\r\n left: 10\r\n });\r\n win.add(label);\r\n\r\n Log('====================================');\r\n Log('Test #4');\r\n Log('You should see:');\r\n Log('Label of height SIZE and margin of 5 on left and right of window');\r\n Log('====================================');\r\n\r\n return win;\r\n});\r\n// 5\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n top: 10,\r\n bottom: 10\r\n });\r\n win.add(label);\r\n Log('====================================');\r\n Log('Test #5');\r\n Log('You should see:');\r\n Log('Label of width SIZE and margin of 5 on top and bottom of window');\r\n Log('====================================');\r\n return win;\r\n});\r\n// 6\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n height: Ti.UI.SIZE\r\n });\r\n\r\n var label = Ti.UI.createLabel({\r\n backgroundColor: 'red',\r\n height: 30, text: 'Hello World',\r\n left: 10, right: 10,\r\n top: 10, bottom: 10\r\n });\r\n\r\n view.add(label);\r\n win.add(view);\r\n Log('====================================');\r\n Log('Test #6');\r\n Log('You should see:');\r\n Log('Blue view of width FILL and height of SIZE');\r\n Log('Label inside has margin all around blue view of 10');\r\n Log('====================================');\r\n return win;\r\n});\r\n// 7\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE\r\n });\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n left:5, right: 5,\r\n top: 5, bottom: 5,\r\n width: Ti.UI.SIZE,\r\n height: Ti.UI.SIZE\r\n });\r\n\r\n view.add(label);\r\n win.add(view);\r\n Log('====================================');\r\n Log('Test #7');\r\n Log('You should see:');\r\n Log('Blue view of width SIZE and height of SIZE');\r\n Log('Label inside has margin all around blue view of 5');\r\n Log('====================================');\r\n return win;\r\n});\r\n// 8\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n\r\n var view = Ti.UI.createView({\r\n backgroundColor: 'blue',\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE\r\n });\r\n\r\n var label = Ti.UI.createLabel({\r\n text: 'hello world',\r\n backgroundColor: 'red',\r\n left:5, right: 5,\r\n top: 5, bottom: 5\r\n });\r\n\r\n view.add(label);\r\n win.add(view);\r\n Log('====================================');\r\n Log('Test #8');\r\n Log('You should see:');\r\n Log('Blue view of width FILL and height of FILL');\r\n Log('Label inside has margin all around blue view of 5');\r\n Log('====================================');\r\n return win;\r\n});\r\n\r\n//9\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n var label = Ti.UI.createLabel({\r\n text: 'width 200, height 100',\r\n width: 200,\r\n height: 200,\r\n backgroundColor: 'red'\r\n });\r\n win.add(label);\r\n Log('====================================');\r\n Log('Test #8');\r\n Log('You should see:');\r\n Log('Label of height 200 and width 200');\r\n Log('====================================');\r\n return win;\r\n});\r\n\r\n// 10\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n var button = Ti.UI.createButton({\r\n title: 'width 300',\r\n width: 300\r\n });\r\n win.add(button);\r\n Log('====================================');\r\n Log('Test #10');\r\n Log('You should see:');\r\n Log('Button of height SIZE and width 300');\r\n Log('====================================');\r\n return win;\r\n})\r\n\r\n//11\r\nTest.push(function(){\r\n var win = Ti.UI.createWindow();\r\n var button = Ti.UI.createButton({\r\n title: 'width 300 right 5',\r\n width: 250,\r\n right: 5\r\n });\r\n win.add(button);\r\n Log('====================================');\r\n Log('Test #11');\r\n Log('You should see:');\r\n Log('Button of height SIZE, width 250 and right 5');\r\n Log('====================================');\r\n return win;\r\n})\r\n\r\nfunction Button(_params) {\r\n _params = _params || {};\r\n var callback = _params.onClick || function(){};\r\n delete _params.onClick;\r\n var btn = Ti.UI.createButton(_params);\r\n btn.addEventListener('click', callback);\r\n return btn;\r\n}\r\n\r\nfunction Window() {\r\n var win = Ti.UI.createWindow();\r\n var scrollView = Ti.UI.createScrollView({\r\n layout: 'vertical'\r\n });\r\n\r\n for(var i = 0, len = Test.length; i < len; i++) {\r\n\r\n scrollView.add(Button({\r\n top: 10,\r\n bottom: 10,\r\n height: Ti.UI.SIZE,\r\n title: 'Test #' + (i + 1),\r\n test: i,\r\n onClick: function(){\r\n var w = Test[this.test]();\r\n w.backgroundColor = '#DDDDDD';\r\n w.add(Button({\r\n right: 0,\r\n top: 0,\r\n width: 20,\r\n onClick: function() {\r\n w.close();\r\n }\r\n }));\r\n w.open();\r\n }\r\n }));\r\n }\r\n\r\n win.add(scrollView);\r\n return win;\r\n}\r\n\r\nWindow().open();\r\n{code}\r\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-06-15T05:13:08.000+0000", "updated": "2013-06-15T05:34:20.000+0000" }, { "id": "258073", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "ran test code all passed - nice regression tests", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-15T06:32:37.000+0000", "updated": "2013-06-15T06:32:37.000+0000" }, { "id": "258099", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix & the buttons are displayed as per the dimensions spcified.\r\nThus closing.\r\n\r\nEnvironment:\r\nTi Studio : 3.1.1.201306112235\r\nTi BB SDK : 3.1.1.v20130615160957\r\nMac OSX : 10.8.3\r\nAlloy : 1.1.3-cr\r\nCLI - 3.1.1-cr\r\nwin 7 \r\nWin 8 \r\nZ10 BB simulator : 10.0.10.822\r\nZ10 device running 10.0.10.88", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-06-16T00:55:45.000+0000", "updated": "2013-06-16T00:55:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }