• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Connect a NSTableView to a datasource in another nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connect a NSTableView to a datasource in another nib


  • Subject: Re: Connect a NSTableView to a datasource in another nib
  • From: Luc Van Bogaert <email@hidden>
  • Date: Tue, 18 Jan 2011 23:59:52 +0100

On 18 Jan 2011, at 23:28, Quincey Morris wrote:

> The data source is part of the window interface. I think you mean to say you want to keep the (or, a) data model in the app delegate, which is fine. Put it there, but implement the data source protocol in the History window controller ...
>
>> I've been struggling (in XBuilder) to connect the NSTableView object in History.xib with it's datasource object (the app delegate) which is in MainMenu.xib.
>
> ... so there's no need to connect History.xib to MainMenu.xib.


Thank you for your help. It makes sense to me: keep the data model in the app delegate, but implement the data source protocol methods in the History window controller.

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?

--
Luc Van Bogaert
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

  • Follow-Ups:
    • Re: Connect a NSTableView to a datasource in another nib
      • From: Graham Cox <email@hidden>
    • Re: Connect a NSTableView to a datasource in another nib
      • From: Quincey Morris <email@hidden>
References: 
 >Connect a NSTableView to a datasource in another nib (From: Luc Van Bogaert <email@hidden>)
 >Re: Connect a NSTableView to a datasource in another nib (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Connect a NSTableView to a datasource in another nib
  • Next by Date: Re: Window Controllers & Window Deallocation
  • Previous by thread: Re: Connect a NSTableView to a datasource in another nib
  • Next by thread: Re: Connect a NSTableView to a datasource in another nib
  • Index(es):
    • Date
    • Thread