View Full Version : showPanel ~bug? / possible code improvement

7 Apr 2007, 9:36 PM
Ok I have a favor after 2 hours of debugging to realize I was calling the wrong function.

I was calling the good old hidePanel which works and then thinking that I needed to call showPanel to see it again. Well it cause a really bad side effect with the tab bar not unhiding in the style sheet from visible. Well I thought it was a bug so I spent about 2 hours tracing (learning) code to try and see what was going on before I just start calling Jacks name to fix it. Well after awhile I saw the wonderful code of unhidePanel which needs to be called to turn the panel back on.

So JACK... What I am thinking is that since it creates a weird side effect if you don't call unhidePanel I was wondering if you could somehow check in showPanel to see if it is visible first and if not unhide it then continue with the showPanel function.

20882 showPanel : function(panel){

--> Check to see if hidden if so unhidePanel();

20883 if(panel = this.getPanel(panel)){
20884 if(this.tabs){
20885 this.tabs.activate(panel.getEl().id);
20886 }else{
20887 this.setActivePanel(panel);
20888 }
20889 }
20890 return panel;
20891 },

8 Apr 2007, 9:28 AM
Good suggestion. It's in SVN. :)