Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Whinnery kwhinnery

  • Twilio
  • Saint Paul / Minneapolis
View GitHub Profile
View Component.js
//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);
@kwhinnery
kwhinnery / Person.js
Created Jul 19, 2011
Monkey patch for require in Titanium Mobile
View Person.js
exports.Person = function(firstName,lastName) {
this.firstName = firstName;
this.lastName = lastName;
};