Reputation: 1110
I'm debugging Ext JS and I came across this piece of code. For some reason, javascript tells me one minute that field.setChecked is a function and the next minute it tells me otherwise. What in javascript could cause an error like this???
Upvotes: 1
Views: 1430
Reputation: 1110
The only thing I can figure is that Google Chrome is having a rare debugger error and not displaying the output correctly. the third value in the fields array doesn't have a setChecked function, and I think it's getting confused and showing me the value for the third one as opposed to the first one like it appears to be doing. Somehow it's out of sync.
Upvotes: 0
Reputation: 851
As I get you have Ext.form.field.Checkbox. This component does not have setChecked()
function. Replace it by setValue(true)
.
setChecked(true)
can be used for Ext.menu.CheckItem component
Upvotes: 1