Skip to content

Instantly share code, notes, and snippets.

@sr3d
Created October 1, 2010 02:10
Show Gist options
  • Save sr3d/605625 to your computer and use it in GitHub Desktop.
Save sr3d/605625 to your computer and use it in GitHub Desktop.
Ti.include('../../lib/active_record.js');
Ti.include('../../lib/utils.js');
Ti.include('../../lib/models.js');
win.orientationModes = [ Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT ];
/* intermediate page to let quick refresh */
var tableView = Ti.UI.createTableView({style: Titanium.UI.iPhone.TableViewStyle.GROUPED});
var rows = [];
rows.push( Ti.UI.createTableViewRow( { title: 'Expenses', url: 'index.js' } ) );
tableView.data = rows;
tableView.addEventListener('click', function(e){
var row = e.rowData;
if( row.url ) {
var newWin = Ti.UI.createWindow( { url: row.url } );
tab.open(newWin,{animated:true});
};
});
win.add(tableView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment