Re: NSDocument and NSViewControllers

2015-12-05 Thread Rick Mann
> On Dec 5, 2015, at 12:40 , Quincey Morris > wrote: > > On Dec 5, 2015, at 12:20 , Rick Mann wrote: >> >> I'll probably make the document a delegate of the view controller so it can >> be informed of changes to the model. > > This may not apply to your app, but what I usually end up doing

Re: NSDocument and NSViewControllers

2015-12-05 Thread Quincey Morris
On Dec 5, 2015, at 12:20 , Rick Mann wrote: > > I'll probably make the document a delegate of the view controller so it can > be informed of changes to the model. This may not apply to your app, but what I usually end up doing in an app of any complexity is have (essentially) two data models.

Re: NSDocument and NSViewControllers

2015-12-05 Thread Rick Mann
> On Dec 5, 2015, at 05:24 , Jerry Krinock wrote: > > >> On 2015 Dec 04, at 16:32, Rick Mann wrote: >> >> I have an NSViewController subclass and SCNView subclass. I can get at the >> document from the NSViewController subclass via a rather cumbersome "let doc >> = self.view.window?.windowC

Re: NSDocument and NSViewControllers

2015-12-05 Thread Jerry Krinock
> On 2015 Dec 04, at 16:32, Rick Mann wrote: > > I have an NSViewController subclass and SCNView subclass. I can get at the > document from the NSViewController subclass via a rather cumbersome "let doc > = self.view.window?.windowController?.document as? ModelDocument” I just happened to hav

NSDocument and NSViewControllers

2015-12-04 Thread Rick Mann
I have a very complex "document" that I'm writing an editor for. It's a collection files, lending itself to the bundle document style. I use NSFileWrappers, and when I open one of these in my app, I get called to read the contents. I don't have to read every file all the time, it depends on what