     @setTabHandleContainer options.tabHandleContainer ? null
 
     @listenWindowResize()
-    
-    @listenTo
-      KDEventTypes        : ["PaneRemoved","paneAdded"]
-      listenedToInstance  : @
-      callback            : @resizeTabHandles
+
+    @on "PaneRemoved", => @resizeTabHandles type : "PaneRemoved"
+    @on "PaneAdded", (pane)=> @resizeTabHandles {type : "PaneAdded", pane}
 
     if options.tabNames?
       @listenTo
         KDEventTypes        : "viewAppended"
         listenedToInstance  : @
         callback            : @createPanes
-          
-  
+
+
   handleMouseDownDefaultAction:(clickedTabHandle,event)->
     for handle,index in @handles
       if clickedTabHandle is handle

        title   : paneInstance.options.name
        hidden  : paneInstance.options.hiddenHandle
        view    : paneInstance.options.tabHandleView
      paneInstance.tabHandle = newTabHandle      
      @listenTo
        KDEventTypes : "click"
        listenedToInstance : newTabHandle
        callback : @handleMouseDownDefaultAction
      @appendPane paneInstance
      @showPane paneInstance
      @handleEvent type : "PaneAdded",pane : paneInstance
      return paneInstance
    else
      warn "You can't add #{paneInstance.constructor.name if paneInstance?.constructor?.name?} as a pane, use KDTabPaneView instead." 
      false

  removePane:(pane)->

    #   for handle in visibleHandles
    #     handle.$().css width : ((containerSize-50)/visibleHandles.length) - 15

  _windowDidResize:(event)=> @resizeTabHandles event

