Re: Connect a NSTableView to a datasource in another nib
Re: Connect a NSTableView to a datasource in another nib
- Subject: Re: Connect a NSTableView to a datasource in another nib
- From: Quincey Morris <email@hidden>
- Date: Tue, 18 Jan 2011 15:37:13 -0800
On Jan 18, 2011, at 14:59, Luc Van Bogaert wrote:
> But then, I'm still wondering how I can reference the app delegate and the data model from the data source protocol methods. I'm sure it's pretty obvious, but clearly I'm still missing something.
>
> When allocating and initializing the HistoryController from the app delegate, I suppose I could somehow pass a reference to 'self' to the HistoryController instance. Would this be the way to proceed?
That would be perfectly sensible, via some kind of 'initWithDataModel:' method in your controller subclass . Or, your data source can rely on [NSApp delegate] as a way of finding the data 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