Connect a NSTableView to a datasource in another nib
Connect a NSTableView to a datasource in another nib
- Subject: Connect a NSTableView to a datasource in another nib
- From: Luc Van Bogaert <email@hidden>
- Date: Tue, 18 Jan 2011 23:10:51 +0100
Hi,
I've been struggling for some time getting to work the following app design:
I have two seperate nib files (MainMenu.xib and History.xib). I have implemented a controller (HistoryController) to manage the window in History.xib. The history window is displayed using a button in MainMenu.xib that sends an action message to the application delegate. The action method then allocates and initializes a HistoryController object which is then displayed. The window delegate releases the resources upon closing the history window. So far so good.
The history window contains a NSTableView object. I would prefer to implement this table's datasource in the application delegate, so I can keep on collecting data for the table, even when the history window object is nil (not displayed).
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.
I hope this does not sound too complicated to some of you, and that someone could provide some hints on how to proceed.
Thank you,
--
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