Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11176] iOS: TableView - Postlayout table event fired 3 times

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-26T08:34:39.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsparity, qe-ios090112
ReporterTamila Smolich
AssigneeShameer Jan
Created2012-09-26T21:21:38.000+0000
Updated2017-03-21T21:58:35.000+0000

Description

Description: Postlayout table event fired 3 times on iOS and alert appears 3 times as well. This is not a regression, occurs on 2.1.2. Steps: 1. Run the following code and check the console:
var win = Ti.UI.createWindow({
    backgroundColor:'white',
    title:'test',
    modal:true
});
  
var data1 = [];
  
var tvr = Ti.UI.createTableViewRow({
    title:'pippo',
    hasChild:true
});
data1.push(tvr);
  
var table = Ti.UI.createTableView({
    top: 10,
    left: 10,
    width: 200, 
    height: 200,
    scrollable: false,
    borderRadius: 10,
    backgroundColor: 'white',
    data : data1
});
table.addEventListener('postlayout', function() {
    setTimeout(function(){
        Ti.API.info('#### postlayout table event received.');
        alert('postlayout table event fired');
    },600);
});
win.add(table);
  
win.open();
Expected result: Postlayout table event should be fired only once, also should see one alert "postlayout table event fired" Actual result: Postlayout table event fired 3 times, and alert appears 3 times as well.

Comments

  1. Shameer Jan 2013-03-26

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source