NSToolbarItemValidation

Validation of a toolbar item.

Overview

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.

Topics

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.

See Also

Management

protocol NSToolbarDelegate

A set of optional methods implemented by toolbar delegates to configure the toolbar and respond to changes.