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});
});
2 Answers
-
Accepted Answer
Hi try using this to open the window:
Titanium.UI.currentWindow.tab.open(winEvent,{animated:true});
hope this helps. ;)
-
I started all over and then everything worked. Weird.