[TIMOB-11389] Android: TableViewRow - Longpress on tableViewRow gives a RunTime Error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-10-19T17:21:05.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 |
Components | Android |
Labels | api, module_tableviewrow, qe-and100112, qe-testadded, regression |
Reporter | Tamila Smolich |
Assignee | Karl Rowley |
Created | 2012-10-11T18:15:27.000+0000 |
Updated | 2012-12-20T17:56:53.000+0000 |
Description
Description:
Longpress on tableViewRow gives a RunTime Error.
This is a regression, does not occur on 2.1.3
Steps:
1. Run the following code:
var _window = Titanium.UI.createWindow({backgroundColor:'white'});
var row = Titanium.UI.createTableViewRow({
height : 'auto'
});
var view = Titanium.UI.createView({
backgroundColor : 'red',
width : '90%',
height : '40'
});
row.add(view);
row.addEventListener('longpress', TableViewRowLongPress);
var table = Titanium.UI.createTableView();
table.appendRow(row);
_window.add(table);
function TableViewRowLongPress(evt) {
alert('*TableViewRow longpress');
}
_window.open();
2. Long press on a red view
Expected:
Should get an alert "*TableViewRow longpress"
Actual:
RunTime Error
Attachments
File | Date | Size |
---|---|---|
device-2012-10-11-110613.png | 2012-10-11T18:15:27.000+0000 | 65468 |
This works with the fix for [TIMOB-11320]. I'm going to mark this ticket as a duplicate.
duplicate of [TIMOB-11320]
Reopening issue. The RunTime Error still appears after long press on red tableView row. Tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)
I'm seeing this failure now: Thread [<9> KrollRuntimeThread] (Suspended (exception ClassCastException))
Pull request https://github.com/appcelerator/titanium_mobile/pull/3286 It looks as though some recent changes to event handling code caused this regression.
Master PR merged. Ready for 3_0_X cherry-pick PR.
Created pull request https://github.com/appcelerator/titanium_mobile/pull/3300 for 3_0_X branch.
No runtime error is thrown now.Verified with following environment on emulator and galaxy nexus 4.0.4. Titanium SDK: 3.1.0.v20121024131714 Titanium SDK:3.0.0.v20121024144610 Titanium Studio:3.0.0.201210220122