Re: NSTableView, NSArrayController, NSManagedObjectContext
Re: NSTableView, NSArrayController, NSManagedObjectContext
- Subject: Re: NSTableView, NSArrayController, NSManagedObjectContext
- From: "I. Savant" <email@hidden>
- Date: Tue, 1 Jan 2008 14:28:43 -0500
On Jan 1, 2008, at 2:22 PM, Ture Pålsson wrote:
Now I suddenly need do call methods in an NSController, meaning that
I need
to have a reference (probably in the form of an IBOutlet) to this
controller somewhere. This is what put me off a bit.
Bindings and Core Data don't do everything for you. :-) Just a few
days ago, mmalc (quite correctly) said, "sometimes you just need to
write some code".
In this case, you're doing something outside your array
controller's purview, so you need to tell it to -fetch: which means
sending it a message. This in turn means (in your situation) an outlet
to the array controller in your nib. This is perfectly normal (in
fact, it's damned near impossible to avoid :-D).
Take-home message: Don't feel you're doing something 'wrong' or
'dirty' ... you're on the right track with an outlet.
--
I.S.
_______________________________________________
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
References: | |
| >NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: mmalc crawford <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "I. Savant" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "I. Savant" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: mmalc crawford <email@hidden>) |
| >Re: NSTableView, NSArrayController, NSManagedObjectContext (From: "Ture Pålsson" <email@hidden>) |