I'm trying to pass an object that I created as a parameter in the constructor of a widget. The object even goes and I can set my property with it, but as soon as it exits the builder it breaks.
Here is where I create the object and try to pass it as parameter to the constructor of my widget:
var mapa = new Mapa("mapa", "basemapGallery", "layerList");
var atualizaWidget = new AtualizaWidget(mapa);
This is the code of my Widget, it breaks well when it exits the constructor:
define([
"dojo/_base/declare",
"dojo/dom",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dojo/text!./widget/templates/AtualizaTemplate.html"
], function (declare, dom, _WidgetBase, _TemplatedMixin, template) {
return declare([_WidgetBase, _TemplatedMixin], {
objMapa: null,
templateString: template,
constructor: function (objMap) {
this.objMapa = objMap;
},
//Ele quebra bem aqui quando sai
postCreate: function () {
//console.log(this.objMapa);
}
});
});
giving the following message:
TypeError: c is undefined ...] [a-zA-Z] * $ /. test (a)? a.toLowerCase (): a; c.tagName? l.set (c, b, : c.set (b, g); break; c ...