/*
* 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();
})();
Run the above code
Click row 1
Scroll up "using row 6" so that row 1 disappears from view and 2 is top
Click row 4
A check will appear in row 6 and event will fire saying row 6 clicked
I would really appreciate some sort of patch for this ASAP. It effects a medical app we have out and essentially this bug results in a mis-calculation of a score. Thanks
A further test case that causes problems is the addition of layout vertical to the containing window. In the example below commenting out the top and bottom values "fixes" the problem un-commneting the
will cause the same issue despite the top and bottom remaining commented out
Hi Neville, Could you please provide info about the Ti SDK that you are using? Does this issue also occur in 2.1.0.GA (if you are not using it) or the latest CI build?
Sorry, yes it was on 2.1.0 GA, but I also tested on 2.0.1 and occurs in that too. Haven't tried 1.8.x
Sorry, is there any news on this. It's a pretty serious bug. More than medium I would suggest.
For some reason, I am still having issues trying to recreate this, even in 2.1. Is there any hints or technique in triggering this?
That is odd. It issue occurs very consistently for me. Certainly on the iPhone simulator. I'll try again on the iPad hardware. Does that mean when you follow the steps above, it doesn't occur for you?
Tested on IOS Sim (4.3, 5.0, 5.1), iPAD3 (5.1.1) and iPod touch (4.3.5) with 2.1.1 GA and current master. Can not reproduce the issue with either of the attached test cases.
I still get this issue. I have just re-built using SDK 2.1.1 GA on OSX 10.6 IOS Sim 5.0 Here is the video http://www.youtube.com/watch?v=AtpqJLQFV4c And using this code. Different to above as was trying to narrow down further.
Thanks for the video. Seems to be a valid issue
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2698
Pull merged.
Verified fix with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK: 2.2.0.v20120813184911 Devices: iPhone 4s 5.0.1 iPad1 5.1.1 Simulator 5.1 Note:in Console [INFO] Row number # clicked reflects # of Row actually clicked:)
Re-opening to edit label
Nice to see a fix, but months after PR still not in released SDKs. Is there a reason for the delay? Thanks