I place Ext.direct.Manager.addProvider into the constructor method of my application and it works fine with dynamic class loading, as well.
Code:
Ext.define('school.Application', {
name: 'school',
extend: 'Ext.app.Application',
requires: ['Ext.direct.*'],
autoCreateViewport: true,
constructor: function(config) {
config = config || {};
(function applyMultipleNamespacesOfRemoteApi (apiNamespace){
Ext.Object.each(apiNamespace, function(key, value, object) {
if (key == 'REMOTING_API') {
Ext.direct.Manager.addProvider(value);
} else {
applyMultipleNamespacesOfRemoteApi(value); // recursive call
}
});
})(Ext.remote);
this.callParent([config]);
},
views: [],
controllers: [],
models: [],
stores: []
});