So, in Titanium, you are unable to extend the native classes. You’re also unable to add methods to native objects or re-assign methods (so, if you wanted to, say, modify an object so that the “hide” function triggers an event, tough sh*t). There is, however, a decent way of getting around this inadequacy (read: violant violation of the ECMA standards, but who are we to judge).
var Klass = function(){ this.toView = function(){ return Klass.prototype } } Klass.prototype = Ti.UI.createView({ /*... the rest of the parameters here (as usual) ... */ }); var view = new Klass();
Then, if you want to add the object to a window, you need to remember to call win.add(view.toView()), but it means you can now carry around the data object with *all* of its data.
We’ve entered the age of the browser. Even without such things as Eyeos, we’ve come to the point where you can literally do anything without leaving Chrome, Firefox, or even Internet Explorer. Need email? We got that. What about RSS? Do you have a document you want to edit?