Created
February 8, 2013 21:59
-
-
Save shanestillwell/4742286 to your computer and use it in GitHub Desktop.
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
function ApplicationWindow(title) { | |
var self = Ti.UI.createWindow({ | |
title:title, | |
backgroundColor:'white' | |
}); | |
var button = Ti.UI.createButton({ | |
height:44, | |
width:200, | |
title:L('openWindow'), | |
top:20 | |
}); | |
self.add(button); | |
button.addEventListener('click', function() { | |
//containingTab attribute must be set by parent tab group on | |
//the window for this work | |
self.containingTab.open(Ti.UI.createWindow({ | |
title: L('newWindow'), | |
backgroundColor: 'white' | |
})); | |
}); | |
var module = require('com.shanestillwell.mod'); | |
var label = Ti.UI.createLabel({ | |
text: module.exampleProg | |
}); | |
self.add(label); | |
return self; | |
}; | |
module.exports = ApplicationWindow; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment