Where's the NSWindowController in a default document-based app
Where's the NSWindowController in a default document-based app
- Subject: Where's the NSWindowController in a default document-based app
- From: Glen Low <email@hidden>
- Date: Fri, 18 Jun 2004 22:59:15 +0800
Hi All,
I'm thinking of factoring out some window-level "controller"
functionality away from the NSDocument subclass into a
NSWindowController subclass -- at least so that the NSDocument subclass
isn't burdened by too much UI work. I understand the nib configuration
instructions given in:
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/
Concepts/WinControllersAndNibs.html#//apple_ref/doc/uid/20000026
To summarize:
File's Owner == window controller subclass
File's Owner window outlet == window
window's delegate == File Owner
However what I don't quite understand is this:
1. When I make a new document-based app in Xcode, by default the nib
gets set like this:
File's Owner == NSDocument
File's Owner window outlet == window
window's delegate == File Owner
So where does the (default?) NSWindowController come into play?
2. Assuming I make my NSWindowController subclass and wire it into the
system, does the NSWindowController then pass responder chain messages
back up to the NSDocument (or subclass) or do I have to handle all the
messages at the NSWindowController level e.g. save?
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.