         title   : paneInstance.options.name
         hidden  : paneInstance.options.hiddenHandle
         view    : paneInstance.options.tabHandleView
-      paneInstance.tabHandle = newTabHandle      
+      paneInstance.tabHandle = newTabHandle
       @listenTo
         KDEventTypes : "click"
         listenedToInstance : newTabHandle
         callback : @handleMouseDownDefaultAction
       @appendPane paneInstance
       @showPane paneInstance
-      @handleEvent type : "PaneAdded",pane : paneInstance
+      @emit "PaneAdded", paneInstance
       return paneInstance
     else
-      warn "You can't add #{paneInstance.constructor.name if paneInstance?.constructor?.name?} as a pane, use KDTabPaneView instead." 
+      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
    
    
    if isActivePane
      newIndex = if @getPaneByIndex(index-1)? then index-1 else 0
      @showPane @getPaneByIndex(newIndex) if @getPaneByIndex(newIndex)?
    @emit "PaneRemoved"

  # ADD/REMOVE HANDLES
  addHandle:(handle)->
