Instance Method

documentClassForType:

Returns the NSDocument subclass associated with a given document type.

Declaration

- (Class)documentClassForType:(NSString *)typeName;

Parameters

typeName

The name of a document type, specified by CFBundleTypeName in the application’s Info.plist file.

The document type must be one the receiver can read.

Return Value

Returns the NSDocument subclass associated with documentTypeName. If the class cannot be found, returns nil.

See Also

Managing Document Types

documentClassNames

An array of strings representing the custom document classes supported by this app.

defaultType

Returns the name of the document type that should be used when creating new documents.

- displayNameForType:

Returns the descriptive name for the specified document type, which is used in the File Format pop-up menu of the Save As dialog.

- typeForContentsOfURL:error:

Returns, for a specified URL, the document type identifier to use when opening the document at that location, if successful.