Ticket #2273 (closed defect: fixed)
parameter usage in dojo.registerNamespaceManifest
| Reported by: | jeremy@… | Owned by: | sjmiles |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 0.4.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I think there is a problem with dojo.registerNamespaceManifest.
dojo.registerNamespaceManifest = function(/*String*/module, /*String*/path, /*String*/name, /*String*/widgetModule, /*Function?*/resolver){
dojo.registerModulePath(name, path);
dojo.registerNamespace(name, widgetModule, resolver);
}
You can see that the 'module' input param is never used. I believe that the 'module' parameter should be used instead of the 'name' parameter in the first line of the function, giving you :
dojo.registerNamespaceManifest = function(/*String*/module, /*String*/path, /*String*/name, /*String*/widgetModule, /*Function?*/resolver){
dojo.registerModulePath(module, path);
dojo.registerNamespace(name, widgetModule, resolver);
}
The reason your namespace test passes is that you happen to use the same value for 'name' and 'module'. Using different values breaks this function.