NSToolbarItemValidation

A toolbar item with a valid target and action is enabled by default. To allow a toolbar item to be disabled in certain situations, a toolbar item’s target can implement the validateToolbarItem(_:) method.

Overview

Symbols

Validating toolbar items

func validateToolbarItem(NSToolbarItem)

If this method is implemented and returns false, NSToolbar will disable theItem; returning true causes theItem to be enabled.