Re: Bypassing Interface Builder
Re: Bypassing Interface Builder
- Subject: Re: Bypassing Interface Builder
- From: Johnny Lundy <email@hidden>
- Date: Thu, 15 May 2008 16:11:43 -0400
OK - I am getting a lot of education here. I am not a total n00b with
Cocoa, and have been studying it and coding it for six years, but I
realize that a lot of stuff I memorized how to do, I never understood
what I was doing.
On May 15, 2008, at 3:06 PM, email@hidden wrote:
Right. I can understand that, that the owner is the shared
application instance. But why do people bind nib objects to File's
Owner?
Well, in the case of the application object you generally don't do
that. But in the case of an NSDocument-based application or an
NSWindowController subclass, both of which load their own NIBs, the
file's owner is the instance of your NSDocument
Ah - HAH!!!! That's the answer!
These tutorials that say to make a document-based app and don't say
why they say that (there are no "documents" in their apps) are doing
it ****so they can connect to File's Owner****.
This is why I could not figure out what connecting to File's Owner had
to do with being able to bind a controller to a model object. It's
because my app is not a document-based app.
Thanks for clarifying that. That indeed was my source of confusion. I
see tutorials connecting things to File's Owner and can't figure out
why.
I do connect the delegate outlet so I can get notification of
applicationWillTerminate: and save my defaults. That is easy to
understand.
Thanks
Johnny
_______________________________________________
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