-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get a reference to the app instance? #21
Comments
The answer depends on whether you are planning on using any of the other capabilities of If you want an application-wide event bus, you can configure the IoC container with one and inject it as needed. To do so, you simply configure the IoC container with an instance of Deft.Injector.configure({
eventBus: 'Ext.util.Observable'
}); (This works because in addition to being usable as a mixin, If it turns out you still need Ext.application({
name: 'MyApp',
launch: function() {
Deft.Injector.configure({
'application': {
value: this
}
});
// Create Viewport and views
...
}
}); I created an example of this approach on JSFiddle here: http://jsfiddle.net/CodeCatalyst/K2ZgR/
Be careful, though. If you use |
That's awesome John. Thank you a ton. Deft is a much better solution than Sencha's first attempt at MVC. Cheers, Neil On Tue, Jun 12, 2012 at 8:42 AM, John Yanarella <
|
In Sencha's controllers, the application is passed in, and set to controller.application.
How do I get a reference to the application from a Deft ViewController? Or do I not want to do that?
How do I fire an app-wide event?
Thanks
Neil
The text was updated successfully, but these errors were encountered: