rf / mockti

titanium mocking
MIT License
27 stars 9 forks source link

Missing activity property of Ti.UI.Window object #5

Closed sukima closed 11 years ago

sukima commented 11 years ago

The Ti.UI.Window object returned from Ti.UI.createWindow() does not include the android only property activity.

A workaround is to wrap the createWindow function and add it:

(function() {
  var origFn = Ti.UI.createWindow;
  Ti.UI.createWindow = function() {
    var win = origFn(arguments);
    win.activity = {};
    return win;
  };
})();
rf commented 11 years ago

thanks, I apparently just completely missed this issue