Re: (Newb) Multiple NSWindowControllers and bindings
Re: (Newb) Multiple NSWindowControllers and bindings
- Subject: Re: (Newb) Multiple NSWindowControllers and bindings
- From: John Velman <email@hidden>
- Date: Tue, 16 Sep 2008 10:42:08 -0700
Thanks, Quincy. I didn't think of using the "File's Owner.document.model"
path directly.
By the way, I actually got the NSWindowController - view-controller from
Apple documentation: CocoaFundamentals.pdf, Appendix B, page 243 says:
"An NSWindowController object manages the presentation of the document in a
window. In MVC terms, a NSWindowController document is a view-controller: "
But I take your point!
Thanks, again,
John V.
On Tue, Sep 16, 2008 at 10:18:32AM -0700, Quincey Morris wrote:
> On Sep 16, 2008, at 09:49, John Velman wrote:
>
>> ... And in a NIB (or
>> XIB), the NSWindowController is the File's Owner, and is the main "View
>> Controller" (as well as the window controller, of course.)
>
> "View controller" in an informal sense, perhaps, but this isn't really good
> terminology. A NSWindowController is not, of course, a NSViewController,
> though the two classes have roughly parallel purposes.
>
>> How do I get the path for displaying an array (or any data) from the model
>> into IB?
>>
>> ...
>>
>> So far, all I've been able to figure out is to give the NSWindowController
>> pointers to the model objects managed by MyDocument. (In a binding
>> compliant way with 'setModel', and 'model' for accessors).
>
> Assuming you use the standard NSDocument methods for creating multiple
> NSWindowControllers and attaching them to the document, your window
> controllers will automatically have a valid "document" property, so you can
> use 'File's Owner.document.model'.
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden