1
I’m trying to pass an object I created as a parameter in the widget builder. The object even goes and I can set my property with it, but as soon as it leaves the Builder it breaks.
This is where I create the object and try to pass it as a parameter to my widget builder:
var mapa = new Mapa("mapa", "basemapGallery", "layerList");
var atualizaWidget = new AtualizaWidget(mapa);
This is the code of my widget, it breaks well when you leave 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,g):c.set(b,g);break;c...