Skip to content

Instantly share code, notes, and snippets.

View kwhinnery's full-sized avatar

Kevin Whinnery kwhinnery

View GitHub Profile
@kwhinnery
kwhinnery / Person.js
Created July 19, 2011 22:52
Monkey patch for require in Titanium Mobile
exports.Person = function(firstName,lastName) {
this.firstName = firstName;
this.lastName = lastName;
};
//Wrapper class to create extensible Titanium components
exports.Component = function(/*Object*/ tiView) {
var self = {
__viewProxy:tiView
};
//passthrough for add
self.add = function(/*Object*/ tiChildView) {
var v = tiChildView.__viewProxy||tiChildView;
self.__viewProxy.add(v);