     private var addButton: NSButton? = nil
     private var scrollLeftButton: NSButton? = nil
     private var scrollRightButton: NSButton? = nil
-    private weak var selectedButton: TabButton? = nil
+    private var selectedButton: TabButton? = nil
 
     private var hideScrollButtons: Bool = true
 //    private var isHighlighted: Bool = false

            let offset = style.tabButtonOffset(position: button.buttonPosition)
            let buttonFrame = CGRectMake(buttonX + offset.x, offset.y, buttonWidth, buttonHeight)
            buttonX += buttonWidth + offset.x
            
            if animated && !button.hidden {
                button.animator().frame = buttonFrame
            } else {
                button.frame = buttonFrame
            }
            
            if let delegateReceiver = self.delegateInterceptor.receiver as? TabsControlDelegate {
                if delegateReceiver.tabsControl?(self, canSelectItem: button.tabButtonCell!.representedObject!) != nil {
                    button.tabButtonCell!.selectable = delegateReceiver.tabsControl!(self, canSelectItem: button.tabButtonCell!.representedObject!)
                    // TODO: not entirely sure this swift code does what I want... fix that.
                }
            }
            
            button.tag = index
            tabsViewWidth += buttonWidth
        }


                                   target: self,
                                   action: #selector(TabsControl.selectTab(_:)),
                                   style: style)
            button.wantsLayer = true
            button.tag = i
            
            button.editable = self.delegate?.tabsControl?(self, canEditTitleOfItem: item) == true

