Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15169 closed defect (fixed)

dijit/registry and WidgetSet

Reported by: mm Owned by:
Priority: undecided Milestone: 1.8
Component: Documentation Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

WidgetSet? states it will be removed in 2.0. Question is if the methods on WidgetSet? (forEach, filer, byClass,..)will be part of registry API or they will desapear ? From util/chets it seems they will be on registry.

Today, they are "mixed" into dijit/registry by including dijit/_base which incldes dijit/WidgetSet.

Hwever if some module uses only dijit/rejistry and does not include digit/_base. So the methods on dijit/registry are stronly dependent on module load order.

Try this:

require([

"dojo", "dojo/on", "dojo/ready", "gjax", "dijit", "dojo/parser", this works, swap with next line and will not work , "dijit/registry"

], function(dojo, on, ready, gjax, dijit,registry) {

ready(function() {

alert(registry.byClass);

});

});

and this: require([

"dojo", "dojo/on", "dojo/ready", "gjax", "dijit", "dijit/registry", will not work, methods from WidgetSet? not mixed "dojo/parser"

], function(dojo, on, ready, gjax, dijit,registry) {

ready(function() {

alert(registry.byClass);

});

});

IMHO the dijit/registry, shall require dijit/WidgetSet.

Change History (3)

comment:1 Changed 7 years ago by mm

Please also review this documentation: http://dojotoolkit.org/api/dijit/registry (Quite empty, states: Object » dijit.registry dojo.require("dijit._base.manager"); Defined in dijit/_base/manager.js Is an instance of dijit.WidgetSet?

and

http://dojotoolkit.org/reference-guide/1.7/dijit/registry.html (suggest require of dijit/registry)

comment:2 Changed 7 years ago by bill

Component: DijitDocumentation
Milestone: tbd1.8
Resolution: fixed
Status: newclosed

WidgetSet states it will be removed in 2.0. Question is if the methods on WidgetSet (forEach, filer, byClass,..)will be part of registry API or they will desapear ?

They will disappear.

The mixin is an implementation detail to affect the dijit.registry global variable. Do not depend on the dijit/registry module having those functions. In other words, never assume that forEach, filer, byClass,.. are part of the object returned from require(["dijit/registry"]).

I updated the documentation to remove that information about the mixin.

Last edited 7 years ago by bill (previous) (diff)

comment:3 Changed 7 years ago by bill

PS: regarding the API documentation (http://dojotoolkit.org/api/dijit/registry), that's actually the doc from 1.6, but starting in 1.8 it will be updated to reflect the official methods in the dijit/registry module.

Note: See TracTickets for help on using tickets.