Next Page > Hide TOC

NSValidatedUserInterfaceItem Protocol Reference

Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.0 and later.
Companion guide
Declared in
NSUserInterfaceValidation.h

Overview

The NSValidatedUserInterfaceItem protocol works with the NSUserInterfaceValidations protocol to enable or disable a control automatically, depending on whether any responder in the responder chain can handle the control’s action method. The NSMenuItem and NSToolbarItem classes implement this protocol.

By conforming to this protocol, your control can participate in this validation mechanism. To validate a control, the application calls validateUserInterfaceItem: for each item in the responder chain, starting with the first responder. If no responder returns YES, the item is disabled. For example, a menu item that sends the copy: action message would disable itself if no responder in the responder chain can be copied.

Tasks

Getting Information About a User Interface Item

Instance Methods

action

Returns the selector of the receiver’s action method.

- (SEL)action

Return Value

The selector of the receiver's action method.

Availability
Declared In
NSUserInterfaceValidation.h

tag

Returns the receiver’s tag integer.

- (NSInteger)tag

Return Value

The receiver's tag.

Availability
Declared In
NSUserInterfaceValidation.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-08-29)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.