Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11385

Android: TableView - RunTime Error as a result of clicking a tableView row

    Details

      Description

      Description:
      RunTime Error as a result of clicking a tableView row.

      This is a regression, does not occur in 2.1.3.

      Steps:
      1. Run the following code:

      /*
       * A simple project based on Single Window Application Template:
       * to test minimal cases
       */
       
      //bootstrap and check dependencies
      if (Ti.version < 1.8 ) {
          alert('Sorry - this application template requires Titanium Mobile SDK 1.8 or later');       
      }
       
      // This is a single context application with mutliple windows in a stack
      (function() {   
          var self = Titanium.UI.createWindow({
              title: 'Window',
              backgroundColor: 'white',
              });    
       
       
          var row;
          var data = [];
               
          for(i=0;i<10;i++) {
                  var l = Ti.UI.createLabel({text: "Test row " + i, left: '10dp', right: '30dp' });
                  var r = Ti.UI.createTableViewRow({rownumber: i, hasCheck: false, backgroundColor: '#eeeeee', className: 'datarow'});
                  r.add(l);
                  data.push(r);
          }
               
          var tv = Ti.UI.createTableView({
                  data: data,
                  backgroundColor: 'transparent',
                  style: Ti.UI.iPhone.TableViewStyle.GROUPED,
                  minRowHeight: '52dp',
                  top: '30dp', bottom: '60dp'
          });
       
          tv.addEventListener('click', function(e){
              Ti.API.info("Row number " + e.row.rownumber + " clicked");
              e.row.hasCheck = !e.row.hasCheck;
          });
           
          self.add(tv);
          self.open();
      })();
      

      2. Click any row

      Expected:
      Row should be clicked and log should display 'Row number # clicked'

      Actual:
      RunTime Error

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                krowley Karl Rowley
                Reporter:
                tsmolich Tamila Smolich
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-14643
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration