         }
         window?.contentView?.addSubview(viewController.view)
         resizeWindowForContentView(view: viewController.view)
-        toolbar.selectedItemIdentifier = convertToOptionalNSToolbarItemIdentifier(itemIdentifier)
+        toolbar.selectedItemIdentifier = NSToolbarItem.Identifier(rawValue: itemIdentifier)
     }
 
     func resizeWindowForContentView(view: NSView) {

        }

        if let controller = viewController {
            changeContent(viewController: controller, itemIdentifier: convertFromNSToolbarItemIdentifier(toolbarItem.itemIdentifier))
        }
    }
}

        return toolbarHeight
    }
}
