{ "id": "62969", "key": "TIMOB-2337", "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": "11228", "name": "Release 1.5.0 M03", "archived": true, "released": true, "releaseDate": "2010-11-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-18T23:07:13.000+0000", "created": "2011-04-15T03:17:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-18T23:07:13.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Environment:

\n
\nubuntu\nandroid emulator\n1_4_X (2 Nov)\n1_5_X (6 Nov) - unable to test due to #2284'\n
\nChange line 19 of \npicker_basic.js from:
\n
\npicker.setSelectedRow(0,1,true);\n
\nto
\n
\npicker.setSelectedRow(0,1);\n
\n

Following exception will occur as soon as script is invoked:

\n
\n  718            KrollContext  D  (kroll$5) [438,21753] eval file: app://examples/picker_basic.js\n  718            KrollContext  E  (kroll$5) [348,22101] Error evaluating source: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18)\n  718            KrollContext  E  org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: argument type mismatch (app://examples/picker_basic.js#18)\n  718            KrollContext  E    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)\n  718            KrollContext  E    at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:109)\n  718            KrollContext  E    at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)\n  718            KrollContext  E    at script(app://examples/picker_basic.js:18)\n  718            KrollContext  E    at org.mozilla.javascript.Interpreter.interpret(Unknown Source)\n  718            KrollContext  E    at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)\n  718            KrollContext  E    at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)\n  718            KrollContext  E    at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)\n  718            KrollContext  E    at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)\n  718            KrollContext  E    at org.mozilla.javascript.Context.evaluateReader(Unknown Source)\n  718            KrollContext  E    at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:159)\n  718            KrollContext  E    at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:101)\n  718            KrollContext  E    at android.os.Handler.dispatchMessage(Handler.java:95)\n  718            KrollContext  E    at android.os.Looper.loop(Looper.java:123)\n  718            KrollContext  E    at android.os.HandlerThread.run(HandlerThread.java:60)\n  718            KrollContext  E  Caused by: java.lang.IllegalArgumentException: argument type mismatch\n  718            KrollContext  E    at java.lang.reflect.Method.invokeNative(Native Method)\n  718            KrollContext  E    at java.lang.reflect.Method.invoke(Method.java:521)\n  718            KrollContext  E    at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:81)\n  718            KrollContext  E    ... 12 more\n
{html}", "attachment": [], "flagged": false, "summary": "Android: picker setSelectedRow() method causes exception when third (bool) argument omitted", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "128199", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Failcase app.js:

\n
\n/*global Ti, Titanium, alert, JSON, setTimeout */\nTitanium.UI.setBackgroundColor('#000');\nvar win = Titanium.UI.createWindow({  \n    title:'Test',\n    backgroundColor:'#fff',\n    exitOnClose: true\n});\nwin.open();\n\nvar rows = [ Ti.UI.createPickerRow({title: 'Row 1'}), Ti.UI.createPickerRow({title: 'Row 2'}) ];\nvar col = Ti.UI.createPickerColumn({ rows: rows });\nvar picker = Ti.UI.createPicker( { columns: [ col ] } );\nwin.add(picker);\ntry {\n    picker.setSelectedRow(0, 1);\n} catch(e) {\n    alert('ERROR: ' + e);\n}\n
\n

If you see an error dialog, then you got the error. If you\ndon't see the error dialog -- and if the row changes to\nRow 2 -- then you already have the fix for this.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:17:06.000+0000", "updated": "2011-04-15T03:17:06.000+0000" }, { "id": "128200", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [591838a54d95778c634837374a9eed5298ca078a])\n[#2337 state:fixed-in-qa] Make third arg of\nsetSelectedRow optional like iOS, and update documentation to\nreflect that. Add unit test for it. Also add a few missing kroll\nannotations in the picker classes \nhttps://github.com/appcelerator/titanium_mobile/commit/591838a54d95...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:17:06.000+0000", "updated": "2011-04-15T03:17:06.000+0000" }, { "id": "128201", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Pass Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8)\ndrillbit test Android Sim 1.6/2.1

\n

android sim 1.6
\n\nhttps://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...

\n

android sim 2.1
\n\nhttps://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:17:07.000+0000", "updated": "2011-04-15T03:17:07.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }