View Full Version : ext.el.xache[].events

3 Aug 2011, 6:26 AM

I am getting ext.el.xache[].events randomly, my app work most of the time without any issue but suddenly gets this error (ext.el.xache[].events ). I am not sure what is causing it.

I saw few answers in forums, they suggested to use itemId instead of id , but now I need to change large code base, but why id is not allowed?

I also tried using autoDestroy:false for few component, but it didnt help.

Please help!

3 Aug 2011, 7:28 AM
I (http://www.sencha.com/forum/showthread.php?142588-ext.el.xache-.events&p=632996#post632996) am actually getting following error:
Message: 'Ext.elCache[...].events' is null or not an object
Line: 4420
Char: 13
Code: 0

that is in

function addListener(el, ename, fn, task, wrap, scope){
el = Ext.getDom(el);
var id = getId(el),
es = Ext.elCache[id].events,
wfn = E.on(el, ename, wrap);
es[ename] = es[ename] || [];

es[ename].push([fn, wrap, scope, wfn, task]);

if(el.addEventListener && ename == "mousewheel"){
var args = ["DOMMouseScroll", wrap, false];
el.addEventListener.apply(el, args);
Ext.EventManager.addListener(WINDOW, 'unload', function(){
el.removeEventListener.apply(el, args);

if(el == DOC && ename == "mousedown"){

4 Aug 2011, 10:54 PM
Please let me know more about your code.
What your code do?
If you provide live demo it would much easy to help you.

I have the problem when id did not exist.

4 Aug 2011, 11:39 PM
Thanks for replying!

Well my screen is formbased, I have a formpanel inside it there are many panels and a grid panel. It is actually a workflow based application, it used save few info from textfiled,combos etc.

The error comes randomly like if I click save mulitlple times then I get this eror sometime not always, For code sharing and demo, pls give me some time to get necessary permissions as it is coporate appliation.

Also, can you please what do you mean by
"I have the problem when id did not exist. ", ??
You solved it by giving ID to each and every component?

Thanks Again!

5 Aug 2011, 1:17 AM
I am not sure at the moment.
I just about three times had the same error.
And the problem was in id.
I mean id just didn't exist.
It was very simple error, my mistakes.
I tryed to get id which doesn't exist.

Maybe the problem is follows:
You have window, all works fine.
Than you close window. In property you don't have closeAction:'hide'
and after you close it an re-open problem appears.
If I am not mistake exactly with Ext.Window I had this problem.