Re: Binding NSArrayController to model array without NSTableView: Master-Detail interface
Re: Binding NSArrayController to model array without NSTableView: Master-Detail interface
- Subject: Re: Binding NSArrayController to model array without NSTableView: Master-Detail interface
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 9 Feb 2005 23:07:27 -0800
On Feb 9, 2005, at 7:24 PM, Fred Glover wrote:
Its selectedObject is bound to ModelController: selection
That's the problem.
You should have something like:
@interface MyDocument : NSDocument
{
NSMutableArray *modelArray;
Model *selectedModel;
}
- (NSMutableArray *)modelArray;
- (void)setModelArray:(NSMutableArray *)aModelArray;
- (Model *)selectedModel;
- (void)setSelectedModel:(Model *)selectedModel;
@end
Then bind 'selectedObject' to [MyDocument].selectedModel
To represent the selection, add an NSObjectController, with 'content'
also bound to [MyDocument].selectedModel
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden