Select to view content in your preferred language

creating AMD module using ArcGIS classes

396
0
07-13-2012 09:50 PM
JohnCartwright
Deactivated User
Hello All,

I'm having problems creating a simple AMD-widget using the "esri/tasks/identify" module.

Given a module that looks like:

define(["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "esri/tasks/identify", "dojo/text!./templates/MyDijit.html"],
 function(declare, _WidgetBase, _TemplatedMixin, identify, template ){
  return declare([_WidgetBase, _TemplatedMixin], {
   templateString: template,

   constructor: function() {
   }

 });
});


and loading it like:

require(["ngdc/MyDijit"], function(MyDijit){
 var myDijit = new MyDijit();
});


I get the error "Uncaught TypeError: Cannot read property 'defaults' of undefined". This only occurs once I add in the
identify module.

Can someone please point out what I'm doing wrong?

Thanks!

--john
0 Kudos
0 Replies