An array of
NSString objects specifying the allowed file types for the panel.
- macOS 10.3+
The value of this property specifies the file types the user can save the file as. A file type can be a common file extension, or a UTI. The default value of this property is
nil, which indicates that any file type can be used. (Note that if the array is not
nil and the array contains no items, an exception is raised.)
If no extension is given by the user, the first item in the
allowed array will be used as the extension for the save panel. If the user specifies a type not in the array, and
true, they will be presented with another dialog when prompted to save.
NSOpen: In versions of macOS earlier than v10.6, this property is ignored. For applications that link against v10.6 and higher, this property determines which files should be enabled in the open panel. You should not use the deprecated methods to show the open panel (that is, the methods that take a
types: parameter) because they will overwrite this value. The allowed file types can be changed while the panel is running (for example, from an accessory view). This is also known as the “enabled file types.” A
nil value indicates that all files should be enabled.