Mac Developer Library

Developer

WebKit Framework Reference WebOpenPanelResultListener Protocol Reference

Options
Deployment Target:

On This Page
Language:

WebOpenPanelResultListener

Inheritance


Not Applicable

Conforms To


Import Statement


Swift

import WebKit

Objective-C

@import WebKit;

Availability


Available in OS X v10.2 with Safari 1.0 and later.
Available in OS X v10.2.7 and later.

WebView user interface delegates that implement the webView:runOpenPanelForFileButtonWithResultListener: method use the methods defined in this protocol to communicate with the listener object. The methods allow the delegate to send a cancel message, or set the selected file name.

  • Displays a file open panel and returns the selected filename.

    Declaration

    Swift

    func chooseFilename(_ fileName: String!)

    Objective-C

    - (void)chooseFilename:(NSString *)fileName

    Parameters

    fileName

    The selected file name.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.2 with Safari 1.0 and later.

    Available in OS X v10.2.7 and later.

  • Displays a file open panel and returns the multiple selected filenames.

    Declaration

    Swift

    func chooseFilenames(_ fileNames: [AnyObject]!)

    Objective-C

    - (void)chooseFilenames:(NSArray *)fileNames

    Parameters

    fileNames

    An array of selected file names.

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.6 and later.

  • Invoked when a file open operation was cancelled.

    Declaration

    Swift

    func cancel()

    Objective-C

    - (void)cancel

    Import Statement

    Objective-C

    @import WebKit;

    Swift

    import WebKit

    Availability

    Available in OS X v10.2 with Safari 1.0 and later.

    Available in OS X v10.2.7 and later.