runModalOpenPanel(_:forTypes:)
Presents a modal Open dialog and limits selection to specific file types.
Declaration
func runModalOpenPanel(_ openPanel: NSOpenPanel, forTypes types: [String]?) -> IntParameters
- openPanel:
The open panel to display.
- types:
An array of allowable types to open.
Discussion
This method is called by the urlsFromRunningOpenPanel() method. It calls the NSOpenPanel runModalForTypes: method, passing the openPanel object and the file extensions associated with a document type. The extensions parameter may also contain encoded HFS file types as well as filename extensions.