Next Page > Hide TOC

NSPathCellDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.5 and later.
Declared in
NSPathCell.h

Overview

The NSPathCellDelegate optional protocol enables the delegate of an NSPathCell object to customize the Open panel or pop-up menu of a path whose style is set to NSPathStylePopUp.

Tasks

Customizing the Open Panel

Customizing the Menu

Instance Methods

pathCell:willDisplayOpenPanel:

Implement this method to customize the Open panel shown by a pop-up–style path.

- (void)pathCell:(NSPathCell *)pathCell willDisplayOpenPanel:(NSOpenPanel *)openPanel

Parameters
pathCell

The path cell that sent the message.

openPanel

The Open panel to be displayed.

Discussion

This method is called before the Open panel is shown but after its allowed file types are set to the cell's allowed types. At this time, you can further customize the Open panel as required. This method is called only when the style is set to NSPathStylePopUp. Implementation of this method is optional.

Availability
Declared In
NSPathCell.h

pathCell:willPopUpMenu:

Implement this method to customize the menu of a pop-up–style path.

- (void)pathCell:(NSPathCell *)pathCell willPopUpMenu:(NSMenu *)menu

Parameters
pathCell

The path cell that sent the message.

menu

The pop-up menu to be displayed.

Discussion

This method is called before the pop-up menu is shown. At this time, you can further customize the menu as required, adding and removing items. This method is called only when the style is set to NSPathStylePopUp. Implementation of this method is optional.

Availability
Declared In
NSPathCell.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-11)


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.