Titanium Community Questions & Answer Archive

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

New window when clicking on row in tableView.

I have a list of events in a tableView recieved from a RSS-feed. That works fine. What I would like to do, is when clicking on an event it should show information regarding this events, with a back-button in the top left corner which should return to the tableView. Very basic, but I just can't get it to work.

Below is what I've tried to do. The title, description and date is printed correctly to the Titanium console, but the iPhone doesn't show a new window labelled "test".
I don't know if it's the correct way to show a new window from a tableView as this is my very first application for iPhones using Titanium.

    feedTableView.addEventListener('click', function(e){

        Ti.API.info('title  :'+e.rowData.thisTitle);
        Ti.API.info('description  :'+strip_tags(e.rowData.thisDesc));
        Ti.API.info('date  :'+strip_tags(e.rowData.thisDate));

        var winEvent = null;
        winEvent = Titanium.UI.createWindow({
            title:'test',
            backgroundColor:'#000000',
            barColor:'#000000'
        });
        Titanium.UI.currentTab.open(winEvent,{animated:true});

    });
— asked May 2nd 2010 by Henrik Aagaard Sørensen
  • iphone
0 Comments

2 Answers

  • Accepted Answer

    Hi try using this to open the window:

    Titanium.UI.currentWindow.tab.open(winEvent,{animated:true});
    

    hope this helps. ;)

    — answered May 2nd 2010 by Kosso
    permalink
    0 Comments
  • I started all over and then everything worked. Weird.

    — answered May 4th 2010 by Henrik Aagaard Sørensen
    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.