Loading ...
Sorry, an error occurred while loading the content.
 

TabView and prototype inherited tabs problems

Expand Messages
  • KELEMEN Viktor
    Hi All, I encountered a problem. I have the following inherited tab chain: YAHOO.widget.Tab
    Message 1 of 1 , Aug 30, 2007
      Hi All,

      I encountered a problem.
      I have the following inherited tab chain:

      YAHOO.widget.Tab <-- BaseTab <-- StatusTab

      Its code:

      BaseTab = function() { }
      BaseTab.prototype = new YAHOO.widget.Tab;

      StatusTab = function(label,content) {
      this.set('label',label);
      this.set('content',content);
      }

      StatusTab.prototype = new BaseTab;

      I tried to put them to a tabview:

      var tabView = new YAHOO.widget.TabView();

      tabView.addTab( new StatusTab('Henry status','content 1'));
      tabView.addTab( new StatusTab('Marie status','content 2'));

      tabView.set('activeTab',tabView.get('tabs')[0]);

      But at the end there is only one tab, which is the last one.

      What's the problem with this code?

      Here is the full code:
      http://people.inf.elte.hu/kelemen/yui/tabview.html

      Thanks in advance,
      Viktor
    Your message has been successfully submitted and would be delivered to recipients shortly.