NSPathCellDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in 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
  • Available in OS X v10.5 and later.
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
  • Available in OS X v10.5 and later.
Declared In
NSPathCell.h