Created
November 2, 2012 18:35
-
-
Save rblalock/4003422 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 NavButton() { | |
var self = this; | |
self.button = Ti.UI.createButton(); | |
self.select = function() {}; | |
self.unselect = function() {}; | |
//etc. | |
} | |
module.exports = NavButton; | |
// implementation file | |
var NavButton = require("navbutton"); | |
var btn = new NavButton(); | |
btn.select(); | |
btn.unselect(); | |
btn.button.addEventListener("click", function() {}); |
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
var NavButton = { | |
button: Ti.UI.createButton(), | |
select: function() {}, | |
unselect: function() {} | |
}; | |
module.exports = NavButton; | |
// implementation file | |
var NavButton = require("navbutton"); | |
NavButton.select(); | |
NavButton.unselect(); | |
NavButton.button.addEventListener("click", function() {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment