View Full Version : addcls null error with textfield when handling isdirty change

9 Apr 2013, 1:48 PM
I have a textfield and when the value of the textfield changes, I check a condition. If the condition is true, I want to show a window.

In the change event of the textfield, a null exception is being through from the addCls method. Stepping through the call stack shows that the error is occurring when the isdirty flag is being set to true and the dirty css class is trying to be added to the text field. The addCls method has this line:

var me = this,
el = me.rendered ? me.el : me.protoEl;

and me.rendered is false...but me.el and me.protoEl are both null. So the next line fails:

el.addCls.apply(el, arguments);

What am I missing here?

11 Apr 2013, 11:53 AM
I've not heard of that error before. Would you be able to post a simple code snippet that demonstrates the error you're seeing?

Also, what version of the the framework you're using would be helpful to make sure were on the same page when testing on this one.