Created
February 14, 2012 23:42
-
-
Save minhnc/1831699 to your computer and use it in GitHub Desktop.
app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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