Hi~
I have a question about "dijit.form.Button".
Why does "_fillContent()" use label value from "this.params"?
Code is here.
_fillContent: function(/*DomNode*/ source){
// Overrides _Templated._fillContent().
// If button label is specified as srcNodeRef.innerHTML rather than
// this.params.label, handle it here.
if(source && (!this.params || !("label" in this.params))){
this.attr('label', source.innerHTML);
}
},
this.params was already mixin with button's instance.
In this case,
if someone make dijit.form.Button's subClass - override
postMixInProperties() method for change the label value,
like this,
postMixInProperties() {
this.label = "HAHAHA";
this.inherited(arguments);
},
then, this label(="HAHAHA") don't show on Button's label.
I think the condition statement of "_fillContent " should be change like this.
if(source && !this.label) {
this.attr('label', source.innerHTML);
}
Thank you.
_______________________________________________
FAQ:
http://dojotoolkit.org/support/faqBook:
http://dojotoolkit.org/docs/bookForums:
http://dojotoolkit.org/forumDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest