Nope, that still gives a 'Layout run failed' message. I see that I left out an important detail though: when I'm toggling the header off, I'm also hiding two of my three columns (the first column is always visible). Here's my toggle handler:
onToggle: function (button, pressed, eOpts)
var panel = button.up('treepanel');
panel.getView().getHeaderCt().setVisible(pressed); // layout run failed
I've tried moving the header visibility toggle before the column visibility toggle, but I still get a layout run failed.
I'm using Ext 4.1.1a. It turns out this message only happens when using ext-dev.js. I've updated your fiddle appropriately: http://jsfiddle.net/FSKJq/
I'm seeing this error in Firefox 19.0.2, Safari 6.0.3, and Chrome 25.0.1364.172 on OS X 10.8.3. Should I be concerned about this error? I'm guessing that ext-dev.js performs additional logging and checking that ext-all.js skips for performance reasons.
If calling setVisible(false) on the header container causes the layout to break, then maybe the header container should override the inherited implementation of setVisible so it does the right thing (setting height to 0). That way the framework makes sense and the same call I can make everywhere else to show/hide components works on this component as well -- instead of blowing up for a non-obvious reason. (In software engineering circles, we refer to this type of API design as The Pit of Success. Right now HeaderContainer.setVisible() is circling The Pit of Despair.)