View Full Version : Mediating an event from one Controller in another.
ryancanulla
1 Feb 2012, 12:04 PM
Is this possible w/out using routes? I want to fire an event in one controller and mediate it in another. In the past I would have used getController() but this seems to have been removed.
Thanks in advance for any help/insight!
Ryan
estesbubba
1 Feb 2012, 2:08 PM
This topic has come up a lot lately. Here is how we do it (look at post #3 for solution)
http://www.sencha.com/forum/showthread.php?167234-Want-controllerB-to-listen-to-custom-event-fired-from-controllerA&p=703978&viewfull=1#post703978
estesbubba
1 Feb 2012, 2:10 PM
FYI it's now me.getApplication()
ryancanulla
1 Feb 2012, 9:50 PM
amazing. thank you!
ryancanulla
1 Feb 2012, 9:56 PM
For anyone else trying to do the same.
FYI - It's now
var me = this;
me.getApplication().on({
loginSuccess : me.onLoggedIn,
scope : me
});
And
var me = this;
me.getApplication().fireEvent('loginSuccess');
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.