Bug ??? win.open(); 5x and iphone simulator quit
I have a TableView.
If I click one row, I open a window mywin.open();
In mywin, I have:
- 1 button close
- 1 Label (with data from a array)
If I click differents or the same linerows 5 times to open mywyn the app quit in the iphone simulator.
If I open the win mywin without the Label it's OK no bug
If I open a Dialog (instead of a win) with the same data. OK no bug
Memory leak with a Label inside mywin ???
I tried to remove the Label, but no effect
win11.remove(taxon_name); in the close button listener
var table = Titanium.UI.createTableView({data:data});
Titanium.UI.currentWindow.add(table);
table.addEventListener('click', function(e)
{
var index = e.index;
var rowdata = e.rowData.id;
win11 = Titanium.UI.createWindow({
title:rowdata
});
var bclose = Titanium.UI.createButton({
title:'Close',
style:Titanium.UI.iPhone.SystemButtonStyle.PLAIN
});
win11.setLeftNavButton(bclose);
bclose.addEventListener('click',function()
{
win11.close();
});
var taxon_name = Ti.UI.createLabel({
text: 'TEST',
font:{fontWeight:'bold',fontSize:16}
});
Titanium.API.info("req: /"+rows.fieldByName('id'));
win11.add(taxon_name);
win11.open({modal:true});
});
1 Answer
-
Hi Bernard,
had the same problem, it's a bug!Fixed in the next release…