PDA

View Full Version : Dynamic reload



koblass
24 Oct 2011, 3:13 AM
Hi,

I would like to reload portion of my application without having to refresh it completely.

In order to do this I use a Ajax request to load the code (classes) and evaluate it.

The problem is that the Ext.define doesn't work if you try to "redefine" the same class.

For instance if I load the following class:



Ext.define('Test.namespace.MyClass', {
extend: 'Ext.Base',
sayHello: function() {
Ext.Msg.alert('say hello');
}
});


This is working the first time, but if I reload it a second time this is not working.

How could I do to "undefine" or "unload" a class in order to be able to reload it.

Best regards
Daniel

koblass
24 Oct 2011, 3:41 AM
Sorry for my previous post.

I just installed version 4.0.7 and this is working perfectly !

Thanks
Daniel