That looks exactly like what I'm looking for. I haven't gotten it to work.
Looking at this sample Avoiding onChange on ComboBox when chaning selection dynamically - JSFiddle I've blended that into my code. The ON seems to get overwritten just like the regular onChange which I'd expect, the WATCH looks great and I may be able to get the behavior I need from it, the AFTER bombs with a "TypeError: Unable to get property 'after' of undefined or null reference".
I've placed the dojo/aspect in my define block at the top of the widget, and included aspect in the function declaration of the widget. It seems that it 'should' be fine... Have I missed a concept somewhere?
The code below is in my onOpen function of the Edit widget. I've tried a variation of it in the getLayers sections of the code as well.
this.assetCodeComboBoxDijit = new dijit.form.ComboBox({
store:this.assetStores.codeStore
});
console.log(this.assetCodeComboBoxDijit);
//this.assetCodeComboBoxDijit.on("change", function(value) { console.log("on:", value); });
//this.assetCodeComboBoxDijit.watch("value", function(name, oldValue, newValue) {console.log("watch:", name, oldValue,newValue);});
aspect.after(this.assetCodeComboBoxDijit, "onChange", function(duno, value) {
console.log("onChange:", value);
});