PDA

View Full Version : [CLOSED] Ext.app.Controller bug in getModuleClassName ?



robl
22 Oct 2011, 3:22 PM
I'm not sure but I think there is a bug in getModuleClassName. this.name should be namespace.



getModuleClassName: function(name, type) {
var namespace = Ext.Loader.getPrefix(name);


if (namespace.length > 0 && namespace !== name) {
return name;
}


return this.name + '.' + type + '.' + name; // IS THIS A BUG?
// Shouldn't it be: return namespace +'.' + type + '.' + name;
},

Jamie Avins
31 Oct 2011, 11:11 AM
Thank you for the report.

rake
11 Dec 2011, 5:07 PM
Looking at this in PR3, getModuleClassName() is no longer in Ext.app.Controller, but has been moved to Ext.app.Application. But has exact same definition as what was classified here as a bug.


getModuleClassName: function(name, type) {
var namespace = Ext.Loader.getPrefix( name );
if (namespace.length > 0 && namespace !== name) {
return name;
}
return this.name + '.' + type + '.' + name;
}

Other thing that looks fishy is that Ext.app.Controller appears to be aliased to Ext.Application. Beginning of Ext.app.Controller is as follows:


Ext.define( 'Ext.app.Controller', {
alternateClassName: 'Ext.Application'

Perhaps some hasty "cut-n-paste" refactoring??

edspencer
15 Dec 2011, 3:27 PM
This has all been reworked for PR4. I'm closing the ticket because it works in a different way internally now