PDA

View Full Version : Ext.onReady function question



navajo
20 May 2010, 10:50 AM
Hello, is it possible to remove a function that was specified for Ext.onReady? For example if I had something like:



var x = new function(){
//do stuff
}

Ext.onReady(x);


then can I do something like



if(some condition){
Ext.onReadyRemove(x);
}


And I don't have control over function x, so I can't do anything inside of it to prevent it from executing. I have to remove it from the onReady queue

hendricd
20 May 2010, 2:14 PM
@navajo--
How about:



var x = function(){
if(some condition){ return ; }
//do stuff
}

Ext.onReady(x);

navajo
20 May 2010, 6:20 PM
Yeah if I could do that I would, but that's why i said I don't have any control over x. It's being defined by some other code that I can't modify.