Instance Method

duplicate(_:)

Creates a copy of the receiving document in response to the user choosing Duplicate from the File menu.

Declaration

@IBAction func duplicate(_ sender: Any?)

Parameters

sender

The control sending the action message.

Discussion

The default implementation of this method merely invokes [self duplicateDocumentWithDelegate:nil didDuplicateSelector:NULL contextInfo:NULL].

See Also

Duplicating Documents

func duplicate() -> NSDocument

Creates a new document whose contents are the same as the receiver and returns an error object if unsuccessful.

func duplicate(withDelegate: Any?, didDuplicate: Selector?, contextInfo: UnsafeMutableRawPointer?)

Create a new document whose contents are the same as the receiver’s and notify the delegate.