{ "id": "115880", "key": "TIMOB-14206", "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": "15547", "description": "2013 Sprint 14", "name": "2013 Sprint 14", "archived": true, "released": true, "releaseDate": "2013-07-15" }, { "id": "15548", "description": "2013 Sprint 14 API", "name": "2013 Sprint 14 API", "archived": true, "released": true, "releaseDate": "2013-07-15" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "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-08-13T17:17:41.000+0000", "created": "2013-06-13T15:42:25.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "BlackBerry", "qe-3.1.2", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:24.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": "*Problem*\r\nThe isValidRow method and rowCount property of ResultSet failed when the table is empty for BlackBerry.\r\n\r\n*Test case*\r\n{code:javascript}\r\nif (Ti.version < 1.8 ) {\r\n\talert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');\r\n}\r\n\r\n// This is a single context application with mutliple windows in a stack\r\n(function() {\r\n\t//determine platform and form factor and render approproate components\r\n\tvar osname = Ti.Platform.osname,\r\n\t\tversion = Ti.Platform.version,\r\n\t\theight = Ti.Platform.displayCaps.platformHeight,\r\n\t\twidth = Ti.Platform.displayCaps.platformWidth;\r\n\t\r\n\t//considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide\r\n\t//yourself what you consider a tablet form factor for android\r\n\tvar isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899));\r\n\t\r\n\t var db = Ti.Database.open(\"testBB2\");\r\n var sSQL = \"Create table if not exists testBB2(key text, value text)\";\r\n db.execute(sSQL);\r\n db.execute(\"delete from testBB2\");\r\n //sSQL = \"insert into testBB2(key,value) values('1', 'testBB77777')\";\r\n //db.execute(sSQL);\r\n var rs = db.execute(\"select * from testBB2\");\r\n\r\n if(rs.isValidRow())\r\n {\r\n alert(rs.fieldByName('value'));\r\n rs.next();\r\n }\r\n \r\n alert('completed!');\r\n rs.close();\r\n db.close();\r\n\t\r\n\t/*\r\n\tvar Window;\r\n\tif (isTablet) {\r\n\t\tWindow = require('ui/tablet/ApplicationWindow');\r\n\t}\r\n\telse {\r\n\t\tWindow = require('ui/handheld/ApplicationWindow');\r\n\t}\r\n\r\n\tvar ApplicationTabGroup = require('ui/common/ApplicationTabGroup');\r\n\tnew ApplicationTabGroup(Window).open();\r\n\t*/\r\n})();\r\n{code}\r\n\r\n*BlackBerry emulator log*\r\n{code}\r\napp.js:38\r\n if(rs.isValidRow())\r\n ^\r\nTypeError: Cannot call method 'isValidRow' of undefined\r\n at app.js:38:15\r\n at app.js:60:3\r\n{code}", "attachment": [], "flagged": false, "summary": "BlackBerry: ResultSet.isValidRow() and ResultSet.rowCount failed when there is no records in table (Ti SDK 3.1.1)", "creator": { "name": "bharat.panthee@maxeam.com", "key": "bharat.panthee@maxeam.com", "displayName": "Bharat Panthee", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bharat.panthee@maxeam.com", "key": "bharat.panthee@maxeam.com", "displayName": "Bharat Panthee", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS X\r\nTi SDK 3.1.1", "comment": { "comments": [ { "id": "266081", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Sample code:\n{code}\nvar db = Ti.Database.open(\"testBB2\");\nvar sSQL = \"Create table if not exists testBB2(key text, value text)\";\ndb.execute(sSQL);\ndb.execute(\"delete from testBB2\");\n\nvar rs = db.execute(\"select * from testBB2\");\n \nif(rs.isValidRow())\n{\n alert(rs.fieldByName('value'));\n rs.next();\n}\n\nalert('completed!');\nrs.close();\ndb.close();\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-12T22:27:49.000+0000", "updated": "2013-08-12T22:27:49.000+0000" }, { "id": "266100", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Running the sample test code given by pedro crashes the app at \"rs.close()\".\r\nReopening", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-12T23:08:19.000+0000", "updated": "2013-08-12T23:08:45.000+0000" }, { "id": "266155", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR for master: https://github.com/appcelerator/titanium_mobile_blackberry/pull/159\nPR for 3.1.x : https://github.com/appcelerator/titanium_mobile_blackberry/pull/160", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-13T01:22:30.000+0000", "updated": "2013-08-13T01:22:30.000+0000" }, { "id": "266245", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "verified the fix & the app works as expected & does not crash at \"re.close()\".\r\n\r\nEnvironment:\r\nAppcel Studio : 3.1.2.201308091728\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-13T17:25:59.000+0000", "updated": "2013-08-13T17:25:59.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }