Posts

Showing posts with the label NSDocumentController

Taming Nsdocument Too Agreement Who's Boss: Creating A Unproblematic Macos Text Editor (Swift 3, Xcode Viii Beta 6)

Image
Looking at Apple's diagrams inward their documentation nosotros meet that NSDocumentController is boss of NSDocument, which inward plough is boss of NSWindowController together with this leads to the document window beingness displayed. Yup, but what is actually happening together with what does this hateful inward price of code? Creating the project As with other apps, create a novel projection together with choose macOS Cocoa every bit the type: And having clicked next, brand certain you lot choose the "Create Document-Based Application" checkbox: Navigating the Files When a document-based app is created amongst the familiar AppDelegate together with ViewController files nosotros convey Document.swift every bit well. This concluding shape file providing a subclass of NSDocument. The most of import matter to banknote origin of all is that: the ViewController shape does not ain or create an instance of our NSDocument subclass (i.e. Document) the...