I've come across an issue where adding a panel to a window and removing it doesn't actually update the DOM. IMHO the "add" and "remove" methods should do exactly what they suggest which is adding and removing a component from its container and also make the necessary changes to the DOM. The add method only adds a component to a container requiring a call to doLayout to actually update the DOM. The remove successfully removes a component from its container but doesn't update the DOM, leaving the components html markup behind. Even a call to doLayout doesn't remove the components markup.
I understand that doLayout is there so you can add multiple components and only calculate the layout once. However, the add method allows you to add an array of components providing a way of keeping the performance up. Surely the add method could automatically call doLayout when components are added?
Removing components is the biggest problem. Once a component has been rendered its markup is not removed until the component is destroyed. You can only show or hide the components markup. So, if you add a panel to a window, call doLayout, then remove the panel, the window still shows the panels markup. More code would have to be written to also hide a panel after removing it. This seems like redundant code to me and something I should not have to worry about. Coming from Objective-C / C++ / VB / .Net etc, the last thing I expected is to manually have to hide a panel after its been removed which took quite a while to figure out, especially as there is no mention on the "remove" method about also hiding a component in the docs.
My original post including some code examples can be found here http://www.sencha.com/forum/showthre...es-old-content
What does everyone else think?