I am getting "Uncaught TypeError: c.advice.apply is not a function" error in the code below. I use the same this.'data-attach-point-name'.set('value', number) for the 'dijit/form/HorizontalSlider'
this.sceneView.on('click', lang.hitch(this, function(evt){
this.sceneView.hitTest(evt.screenPoint).then(lang.hitch(this, function(picked){
console.log(picked);
this.selectedGraphic = picked.results[0].graphic;
// Set Dimentions
this.boxWidthSlider.set('value', this.selectedGraphic.attributes.width);
this.boxDepthSlider.set('value', this.selectedGraphic.attributes.depth);
this.boxAngleSlider.set('value', this.selectedGraphic.attributes.angle);
// Set Stories
//***** I get error below code ******
this.typeResidential.set('value', this.selectedGraphic.attributes.officeStory);
}));
}));
I created 'data-dojo-attach-point' in HTML.
<div data-dojo-type='dijit/form/NumberSpinner' data-dojo-attach-point='typeResidential'
data-dojo-props='smallDelta:1, value:0, constrains:{min:0, max:100, places:0}' style='width: 100%'></div>
I found that the error is coming from the function that shares the same ' data-dojo-attach-point' so please disregard this question.
Commenting out the code below eliminated the problem so I assumed that I am not setting the NumberSpinner value in a correct way, but this is a way to set the NumberSpinner widget value programmatically.
this.typeResidential.set('value', this.selectedGraphic.attributes.officeStory);