Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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});
});
— asked April 10th 2010 by Bernard van den Eynde
  • bug
  • label
  • windows
0 Comments

1 Answer

  • Hi Bernard,
    had the same problem, it's a bug!

    Fixed in the next release…

    Check Ticket #707

    — answered April 10th 2010 by Seb S.
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.