AnsweredAssumed Answered

Bug with dojo/on is version 3.7

Question asked by sholyoak on Oct 2, 2013
Latest reply on Dec 9, 2013 by DMS2
In upgrading my application to version 3.7 of the api, I've run into what I believe is a bug.  When I try to connect to the layers-add-result event for my map, I try to use the dojo/on amd method.  My code for that is:
on(map, "layers-add-result", function(e) {   var toc = new agsjs.dijit.TOC({    map: map,    layerInfos:legendLayers   }, 'legendDiv');   toc.startup();  });


That returns an error "TypeError: Cannot read property 'tagName' of undefined ".  When I try using the old dojo.connect method, though, everything works.  My code using the old dojo.connect is:
dojo.connect(map,'onLayersAddResult', function(results){   var toc = new agsjs.dijit.TOC({    map: map,    layerInfos:legendLayers   }, 'legendDiv');   toc.startup();  });


According to the documents, version 3.7 is using dojo version 1.9.1, which should certainly support the dojo/on functionality.  What, if anything, am I doing wrong.  If I'm not doing anything wrong, how do I file a bug report?

Outcomes