Skip to content

Instantly share code, notes, and snippets.

@rblalock
Created November 13, 2012 20:18
Show Gist options
  • Save rblalock/4068125 to your computer and use it in GitHub Desktop.
Save rblalock/4068125 to your computer and use it in GitHub Desktop.
function MyObject() {
var self = this;
self.someProperty = "test";
self.table = Ti.UI.createTableView();
self.someMethod = function() {};
self.table.addEventListner("click", self.someMethod);
// etc.
}
var module = require("myobject");
var obj = new module();
obj.table.addEventListener("click", function() {});
module.exports = MyObject;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment