PDA

View Full Version : [FIXED] fieldSet.remove(this.up(), true) crashes



olouvignes
16 Oct 2011, 9:59 AM
Hey team,

Inside a button handler in a fieldset :



var fieldSet = this.up('fieldset');
fieldSet.remove(this.up(), true);


Crash log :

Uncaught TypeError: Cannot call method 'removeCls' of null

sencha-touch-all-debug-w-comments.js l.52468

Maybe there is another way (button deleting its parent container inside a form) ?

By the way, it would be great to be able to removeById(), instead of passing a whole object (this.up()) for deletion/removal.

Jamie Avins
17 Oct 2011, 9:01 AM
Thank you for the report.

rdougan
2 Nov 2011, 4:45 PM
Sorry, I can't reproduce this.

What are you trying to do? Remove the button from the field set?

rdougan
2 Nov 2011, 4:49 PM
Actually, I just fixed the issue with removeCls.

But if you want to remove the button, you can either do button.destroy() or fieldset.remove(button).