     
     public required init?(coder: NSCoder) {
         super.init(coder: coder)
-    }
-    
-    public override func awakeFromNib() {
+        self.setup()
+    }
+    
+    override init(frame frameRect: NSRect) {
+        super.init(frame: frameRect)
+        self.setup()
+    }
+    
+    func setup() {
         self.wantsLayer = true
         self.translatesAutoresizingMaskIntoConstraints = false
         

        self.invalidateRestorableState()
    }
    
    // MARK: Actions
    
    // MARK: Reordering
    
    // MARK : Selection
    
    public func selectedItemIndex() -> Int {
        return (self.selectedButton != nil) ? self.selectedButton!.tag : -1

        
    }
    
    // MARK: - Editing
    
    // MARK: - Drawing
    
    override public var opaque: Bool {
        return true
