tableview not opening new window
Hi All
I have this simplified code below which will display 1 table view row, and when the user selects that row the current window should animate to the left and reveal the newWin.js
Problem is it doesn't.
There are no tabs being uses in this window.
var win = Ti.UI.createWindow();
var data = [ {header:'myHeading', title:'open new window', hasChild:true, color:'#000000', selectedColor:'#808080', test:'newWin.js'} ];
var tableView = Titanium.UI.createTableView({
data:data,
style:Titanium.UI.iPhone.TableViewStyle.GROUPED
});
tableView.addEventListener('click', function(e) {
if (e.rowData.test) {
var w = Titanium.UI.createWindow({
url:e.rowData.test,
title:e.rowData.title,
backgroundColor:'#FFFFFF'
});
win.open(w,{animated:true});
}
});
win.add(tableView);
win.open();
Am I doing something wrong here?
Thanks
Jamesy
2 Answers
-
This might help u
http://www.pastie.org/1068433
check it i have created with tabs i think u shd use like Titanium.UI.currentWindow.open(w,{animated:true}) statement, verify it
-
please check this pastie too & inform me if u have any douts still
http://www.pastie.org/1099675