Skip to content

Instantly share code, notes, and snippets.

@minhnc
Created February 14, 2012 23:42
Show Gist options
  • Save minhnc/1831699 to your computer and use it in GitHub Desktop.
Save minhnc/1831699 to your computer and use it in GitHub Desktop.
app.js
/*
* APP.JS
*/
// This file is functioning as a bootstrap file that loads my application's first component (ie. TabGroup). Created as to not pollute the global namespace.
var studiospace = {}; // define app's namespace
Ti.include('ui.js'); // include UI code
// User custom UI constructors to build the app's UI
studiospace.container = studiospace.ui.createApplicationContainer();
function showTabGroup() {
studiospace.container.tabGroup.open({transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_RIGHT});
studiospace.container.manageLogin();
}
// TODO - MINHNC: Test code for Log in/out
function login() {
Ti.App.Properties.setString('user_password', 'somapass');
}
function logout() {
Ti.App.Properties.setString('user_password', '');
}
// open tab group
setTimeout(
function() {
login();
// logout();
showTabGroup();
},
0 //time to wait
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment