AnsweredAssumed Answered

TypeError: clazz is not a constructor

Question asked by Nadir_Hussain on Feb 11, 2019
Latest reply on Feb 11, 2019 by rscheitlin

i have two user defined functions.When i declare and call them i get this error.i dont know why it is happening .please help or suggest me how to declare function inside a web app builder widget. Thanks.

startup: function() {
var panel = this.getPanel();
panel.position.width = 260;
panel.position.height = 300;
panel.panelManager.normalizePanel(panel);'displayedValue', lang.hitch(this, function(property, oldValue, newValue) {
this.getDistinctValues("https://localhost:6443/arcgis/rest/services/BaseMap/MapServer/"+_strSourceLayer,newValue);---------------------->Error on this line
getDistinctValues: function (strURL,strFieldName){
this.getFeatuers(strURL,"1=1", [strFieldName],function(_target){------>  Error on this line
for(var i = 0; i < _target.features.length; i++){
var feat=_target.features[i];
getFeatuers: function (URL,where,OUTFields,callback ){
var query = new _Query();
var queryTask = new _QueryTask( URL);
query.where = where;
query.outSpatialReference = _map.spatialReference;
query.returnGeometry = true;
query.outFields = OUTFields;
queryTask.execute(query, callback);

return clazz;