Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2668] Android: Tableview Click Event Missing Properties

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:46.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M02
ComponentsAndroid
Labelsandroid, defect, regression, release-1.5.2, release-1.6.0, reported-1.5.1, rplist
ReporterDon Thorp
AssigneeMarshall Culpepper
Created2011-04-15T03:26:28.000+0000
Updated2011-04-17T01:59:46.000+0000

Description

Commit https://github.com/appcelerator/titanium_mobile/blob/3ffe548cf7e1e12bf55f82aecf3860ab66e9c8c3/android/modules/ui/src/ti/modules/titanium/ui/widget/tableview/TiTableView.java"> 3ffe548c removed several event properties that are expected and documented. The previous commit https://github.com/appcelerator/titanium_mobile/blob/e18980e31ba5c0e061da3ababd711467471bffeb/android/modules/ui/src/ti/modules/titanium/ui/widget/tableview/TiTableView.java"> e18980e is sending the correct properties.

See http://developer.appcelerator.com/helpdesk/view/62621">Helpdesk 62621

This needs to go on the 1_5_X branch as well.

Comments

  1. Marshall Culpepper 2011-04-15

    (from [dcd6a5a8e0a2890c734e66f05a297d4df18bd3fd]) expose TableViewSection.rows [#2668 state:fixed-in-qa milestone:"Release 1.6.0 M02"]
    https://github.com/appcelerator/titanium_mobile/commit/dcd6a5a8e0a2890c734e66f05a297d4df18bd3fd"> https://github.com/appcelerator/titanium_mobile/commit/dcd6a5a8e0a2...

  2. Marshall Culpepper 2011-04-15

    (from [fdf3bce165a8abf619990b8082e60b8f7b748747]) expose TableViewSection.rows [#2668 state:fixed-in-qa milestone:"Release 1.6.0 M02"]
    https://github.com/appcelerator/titanium_mobile/commit/fdf3bce165a8abf619990b8082e60b8f7b748747"> https://github.com/appcelerator/titanium_mobile/commit/fdf3bce165a8...

  3. Thomas Huelbert 2011-04-15

    sent email for test advice

  4. Thomas Huelbert 2011-04-15

    [INFO] Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06) and [INFO] Titanium SDK version: 1.5.2 (01/10/11 08:22 682e79e) 2.2 sim, 1.6 device

  5. Todd 2011-04-15

    Still having the issue - I've download and installed - "Windows (Android only) filename: mobilesdk-1.5.2-20110111124736-win32.zip sha1: 179ba1e084b3d4160d6f361ec11c7f1f93f22a34"

    Here is the sample code again:
    Titanium.UI.setBackgroundColor('#000');
    var win = Ti.UI.createWindow({
    // backgroundImage:'common/images/1_SplashScreen_C.jpg' });

    win.open();

    var data = [];
    for (var i=0;i<4;i++)
    {

       var row = Ti.UI.createTableViewRow();
       if (i==3)
       {
           row.hasCheck=true;
       }
       var l = Ti.UI.createLabel({
           left:5,
           font:{fontSize:20, fontWeight:'bold'},
           color:'white',
           text:'Label ' + i
       });
       row.add(l);
       data[i] = row;
       

    }

    // create table view var tableview = Titanium.UI.createTableView({

       data:data,
       

    });

    // create table view event listener tableview.addEventListener('click', function(e)
    {

       // event data
       var index = e.index;
       var section = e.section;
       
       Ti.API.info('section = ' + section);    
       Ti.API.info('section rowCount = ' + section.rowCount);  
       Ti.API.info('section.rows = ' + section.rows);  
       
       // reset checks
       for (var i=0;i<section.rows.length;i++)
       {
           section.rows[i].hasCheck = false;
           section.rows[i].children[0].color = 'white';
       }
       // set current check
       section.rows[index].hasCheck = true;
       section.rows[index].children[0].color = 'green';
       

    });

    win.add(tableview);

  6. kevinwhinnery 2011-04-15

    request from two pro seats is to include this fix on the 1.5.x branch - looks like we have code to repro in the 1.5.x branch

  7. Thomas Huelbert 2011-04-15

    okay, checked [INFO] Titanium SDK version: 1.5.2 (01/12/11 10:03 3e8ed10) with g1 (1.6) and droid 1 (2.2.1) same behavior as in 1.6.0

JSON Source