MonobjcMonobjc Documented Class Library
RunModalForDirectoryFileTypes Method (absoluteDirectoryPath, filename, fileTypes)
NamespacesMonobjc.AppKitNSOpenPanelRunModalForDirectoryFileTypes(NSString, NSString, NSArray)

Displays the panel and begins a modal event loop that is terminated when the user clicks either OK or Cancel. (Deprecated in Mac OS X v10.6. Use runModal instead. You can set path using setDirectoryURL:, and you can set fileTypes using setAllowedFileTypes:.)

Original signature is '- (NSInteger)runModalForDirectory:(NSString *)absoluteDirectoryPath file:(NSString *)filename types:(NSArray *)fileTypes'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
[ObsoleteAttribute("Deprecated in Mac OS X v10.6. Use runModal instead. You can set path using setDirectoryURL:, and you can set fileTypes using setAllowedFileTypes:.")]
public virtual NSInteger RunModalForDirectoryFileTypes(
	NSString absoluteDirectoryPath,
	NSString filename,
	NSArray fileTypes
)
<ObsoleteAttribute("Deprecated in Mac OS X v10.6. Use runModal instead. You can set path using setDirectoryURL:, and you can set fileTypes using setAllowedFileTypes:.")> _
Public Overridable Function RunModalForDirectoryFileTypes ( _
	absoluteDirectoryPath As NSString, _
	filename As NSString, _
	fileTypes As NSArray _
) As NSInteger
[ObsoleteAttribute(L"Deprecated in Mac OS X v10.6. Use runModal instead. You can set path using setDirectoryURL:, and you can set fileTypes using setAllowedFileTypes:.")]
public:
virtual NSInteger RunModalForDirectoryFileTypes(
	NSString^ absoluteDirectoryPath, 
	NSString^ filename, 
	NSArray^ fileTypes
)
Parameters
absoluteDirectoryPath (NSString)
The directory whose files the panel displays. When nil, the directory is the same directory used in the previous invocation of the panel; this is probably the best choice for most situations.
filename (NSString)
Specifies a particular file in absoluteDirectoryPath that is selected when the Open panel is presented to the user. When nil, no file is initially selected.
fileTypes (NSArray)
An array of file extensions and/or HFS file types. Specifies the files the panel allows the user to select. nil makes all files in absoluteDirectoryPath selectable by the user. An array of types passed in here will override one set using setAllowedFileTypes:.
Return Value
The button clicked to dismiss the dialog: NSOKButton for the OK button and NSCancelButton for the Cancel button.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)