Skip to content

Notes on application states

JonFerraiolo edited this page Apr 4, 2012 · 3 revisions

When changing color on an HTML button, here is the stack trace upon entering davinci.ve._Widget.js:setStyleValues():

declare.setStyleValues (_Widget.js:559)
declare.execute (StyleCommand.js:69)
dojo.withDoc (window.js:107)
declare.execute (CommandStack.js:24)
declare._stylePropertiesChange (VisualEditor.js:260)
declare._stylePropertiesChange (PageEditor.js:150)
hitch (lang.js:155)
target.(anonymous function) (aspect.js:181)
on.emit (on.js:261)
on.emit (on.js:297)
Evented.emit (Evented.js:28)
publish (topic.js:21)
connect.publish (connect.js:193)
declare._changeValue (Cascade.js:302)
innerChangeValueFunc (Cascade.js:188)
declare._onFieldChange (Cascade.js:257)
hitch (lang.js:153)
target.(anonymous function) (aspect.js:181)
declare._onChange (ColorPicker.js:190)
hitch (lang.js:153)
target.(anonymous function) (aspect.js:181)
(anonymous function) (_FormWidgetMixin.js:191)
hitch (lang.js:155)

And here is the current code for setStyleValues():

	setStyleValues: function( values) {
		if(!values) {
			return;
		}
		var styleDomNode = this.getStyleNode();
		var v = this._sortStyleValues(values);
		var text = this._styleText(v);
		/* reset the style attribute */
		dojo.attr(styleDomNode, "style", text);
		if (this.dijitWidget)
			this.dijitWidget.style = text;
		if (text.length>0)
			this._srcElement.addAttribute("style",text);
		else
			this._srcElement.removeAttribute("style");
	},

Clone this wiki locally