{ "id": "76478", "key": "TIMOB-5566", "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": "2011-06-17T01:13:24.000+0000", "created": "2011-06-16T04:56:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:50:04.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "Method 'close' of Titanium.Database.DB does not work. After using method Ti.Database.DB.close() the data of database is still available.\r\nHow to represent: \r\n1.Insert some data in the database\r\n2. Check content of the database by 'See data'\r\n3. Click on 'CloseDB' button. It will executes method Ti.Database.DB.close() of current database.\r\n4. Click 'See data' and you will see the data of database again.\r\nExpected behavior: Database should be closed and 'See Data' should return nothing.\r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\nwin.backgroundColor = '#fff';\r\nwin.layout = 'vertical';\r\n\r\nvar l = Ti.UI.createScrollView({\r\n\ttop:10,\r\n\tleft:10,\r\n\tfont:{fontSize:14},\r\n\tcolor:'black',\r\n\theight:180,\r\n\twidth:300,\r\n\tborderWidth: 1\r\n});\r\n\r\nwin.add(l);\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\theight:14,\r\n\ttop:5,\r\n\tleft:10,\r\n\twidth:300,\r\n\ttext: 'mobile browser use two finger swipe to scroll data',\r\n\tfont: {fontSize:12}\r\n});\r\n\r\nwin.add(label1);\r\n\r\nvar field = Titanium.UI.createTextField({\r\n\theight:30,\r\n\ttop:10,\r\n\tleft:10,\r\n\twidth:300,\r\n\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED\r\n});\r\n\r\nwin.add(field);\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle:'Insert',\r\n\theight:30,\r\n\twidth:300,\r\n\ttop:10,\r\n\tleft:10,\r\n\tfont: {fontSize:18}\r\n});\r\nwin.add(b1);\r\n\r\nb1.addEventListener('click', function(){\r\n\tdoInsert(field.value);\r\n});\r\n\r\nvar b2 = Ti.UI.createButton({\r\n\ttitle:'See data',\r\n\theight:30,\r\n\twidth:300,\r\n\ttop:10,\r\n\tleft:10,\r\n\tfont:{fontSize:18}\r\n});\r\nwin.add(b2);\r\n\r\nb2.addEventListener('click', function(){\r\n\tseeResults();\r\n});\r\n\r\nvar b3 = Ti.UI.createButton({\r\n\ttitle:'Clean',\r\n\theight:30,\r\n\twidth:300,\r\n\tleft:10,\r\n\ttop:10,\r\n\tfont:{fontSize:18}\r\n});\r\nwin.add(b3);\r\n\r\nb3.addEventListener('click', function(){\r\n\tdeleteEverything();\r\n});\r\n\r\nvar b4 = Ti.UI.createButton({\r\n\ttitle:'CloseDB',\r\n\theight:30,\r\n\twidth:300,\r\n\tleft:10,\r\n\ttop:10,\r\n\tfont:{fontSize:18}\r\n});\r\nwin.add(b4);\r\n\r\nb4.addEventListener('click', function(){\r\n\tdb.close();\r\n});\r\n\r\n\r\nif( (Ti.Platform.osname == 'iphone')&&(!Ti.Platform.isBrowser) ){\r\n\tvar textArea = Ti.UI.createTextArea({\r\n\t\tvalue: '',\r\n\t\twidth: 300,\r\n\t\theight: 180\r\n\t});\r\n\tl.add(textArea);\r\n}\r\n\r\nfunction writeToLog(/*string*/ newLogItem){\r\n\tif( (Ti.Platform.osname == 'iphone')&&(!Ti.Platform.isBrowser) ){\r\n\t\ttextArea.value = textArea.value +'\\n'+ newLogItem;\r\n\t}else{\r\n\t\tl.add(Ti.UI.createLabel({\r\n\t\t\t\ttext: newLogItem + \"