• 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: Binding NSArrayController to model array without NSTableView: Master-Detail interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Binding NSArrayController to model array without NSTableView: Master-Detail interface (From: Fred Glover <email@hidden>)

  • Prev by Date: NSTableView can't delete last column?
  • Next by Date: container retain/release problem
  • Previous by thread: Binding NSArrayController to model array without NSTableView: Master-Detail interface
  • Next by thread: Re: Binding NSArrayController to model array without NSTableView: Master-Detail interface
  • Index(es):
    • Date
    • Thread