MMI.Util.namespace('MMI.App'); MMI.App = { _instance: false, _instanceSet: false, setInstance: function(instance) { if(MMI.App._instanceSet === false) { MMI.App._instance = instance; MMI.App._instanceSet = true; } else { clog('Application instance already set. Cannot set instance again. Use MMI.App.getInstance() to get a reference to the current application instance.'); } }, getInstance: function() { return MMI.App._instance; } };