[TIMOB-16137] iOS: TableView click event reporting different source's on different rows.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-20T04:34:28.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | Release 3.4.0 |
Components | iOS |
Labels | module_tableviewrow, qe-manualtest |
Reporter | Sabil Rahim |
Assignee | Ingo Muschenetz |
Created | 2014-01-07T18:22:14.000+0000 |
Updated | 2014-08-20T22:47:44.000+0000 |
Description
Test code.
Ti.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
title : 'TableView Bug',
});
function makeRow () {
var row = Ti.UI.createTableViewRow({
//objName: 'row',
height:45
});
var primaryLabelwidth = 160;
var primaryLabel = Ti.UI.createLabel({
text:"label1",
top:0,
left:15,
height:30
});
row.add(primaryLabel);
var unitsLabel = Ti.UI.createLabel({
text:"YY",
top:0,
right:49,
height:40,
width:42
});
row.add(unitsLabel);
return row;
}
var table1 = Ti.UI.createTableView({
top:60,
left:0,
right:20,
bottom:40,
editable:true, // 'swipe to delete' on iPhone is the default if you set editable:true in the createTableview command.
moveable:true,
longpressIsActive: false,
objectName: 'table',
visible: true
});
var refreshTableItems = function(){
var test_index = 0;
Ti.API.info('Reached: ');
while (test_index < 5) {
row = makeRow ();
//Shopping list name added to the master table of shopping lists as a specific row
table1.appendRow (row);
test_index = test_index + 1;
}
Ti.API.info('while loop ended: ');
};
refreshTableItems();
table1.addEventListener('click', function(e) {
Ti.API.info("e.row =" + e.row + ", e.source = " + e.source);
});
win.add(table1);
win.open();
Steps to reproduce this issue:
1. Create a new mobile project for iOS7, with 3.2.0.GA 2. Paste the testcase into app.js 3. Run in the simulator 4. Click on the first row. 5. Click on the second row. 6. Check console, you will see the difference, even if you created the two rows in the same way.Log file when YY label is clicked in TableView:
First row output:
[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUITableViewRow]
Second or any other row is clicked:
[INFO] e.row =[object TiUITableViewRow], e.source = [object TiUILabel]
Hello, Is there any update on this issue? Thanks.
Hello, Is there any update on this issue? Thanks.
Issue cannot reproduces Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.4.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
[~shameerj] and [~sunila]. We should test this in 3.2.0 and 3.4.0 (latest master). * If it cannot be reproduced in 3.2.0, then mark as Can't Reproduce, with no fix version * If it can be reproduced in 3.2.0 but not in 3.4.0, mark as Fixed in 3.4.0 Reopening.
Issue reproduces on SDK version 3.2.0 Cannot reproduces on SDK version 3.4.0 Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.4.0.GA Titanium SDK version 3.2.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
Actual result
Tested environment Mac osx 1-.9.4 Maverics Appcelerator Studio, build: 3.4.0.201408180158 Node.JS Version: v0.10.28 NPM Path: /usr/local/bin/npm NPM Version: 1.4.23 acs@1.0.16 alloy@1.5.0-dev (git://github.com/appcelerator/alloy.git#b2e8f580d023e45c63072df924666e58193a8981) install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium@3.4.0-dev (git://github.com/appcelerator/titanium.git#9079326639c7f610dafee33dd16742de7d92d795) titanium-code-processor@1.1.1 Xcode6 Device: iPhone 5c iOS 7.1