Mac Developer Library

Developer

AppKit Framework Reference NSPathCellDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSPathCellDelegate

Inheritance


Not Applicable

Conforms To


Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.5 and later.

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.

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

    Declaration

    Swift

    optional func pathCell(_ pathCell: NSPathCell, willDisplayOpenPanel openPanel: NSOpenPanel)

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    optional func pathCell(_ pathCell: NSPathCell, willPopUpMenu menu: NSMenu)

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.5 and later.