Opened 13 years ago

Closed 12 years ago

#2273 closed defect (fixed)

parameter usage in dojo.registerNamespaceManifest

Reported by: jeremy@… Owned by: sjmiles
Priority: high Milestone:
Component: General Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

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.

Change History (3)

comment:1 Changed 13 years ago by Adam Peller

Owner: changed from anonymous to sjmiles

comment:2 Changed 12 years ago by sjmiles

(In [8330]) Fix typo. Sorry this took so long to get fixed. :( Refs #2273.

comment:3 Changed 12 years ago by sjmiles

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.