PDA

View Full Version : Is there a manager that keeps track of all defined classes? Ext JS 4.2.2



aw1zard2
13 Nov 2013, 7:52 AM
I'm just wondering if I'm overlooking it or if there was a Manager that kept track of all objects that get defined with Ext.define?

Thanks,
Ron

tobiu
13 Nov 2013, 7:57 AM
hi ron,

the only thing that comes to my mind is:
http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.ClassManager

this does not keep track of all instances of all classes (like the window manages does), but you can at least check for isCreated() which internally access this.existCache.

aw1zard2
13 Nov 2013, 8:07 AM
That is what I figured so I've already got my own manager keeping track of sub-app controllers that get defined.
And I already looked at the ClassManager which doesn't quite fit what I need.

Thanks!

aw1zard2
13 Nov 2013, 12:40 PM
I found a simplier way of doing it using the Ext.Base.onExtended(fn,scope) to call a function instead of all my subapp controllers doing it from the Ext.define('text',{config},function(){registerController});