• 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: Access to NSArrayController's NSMutableArray?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access to NSArrayController's NSMutableArray?


  • Subject: Re: Access to NSArrayController's NSMutableArray?
  • From: Scott Anguish <email@hidden>
  • Date: Mon, 19 Jan 2004 16:01:14 -0500

On Jan 19, 2004, at 3:39 PM, Dave Sopchak wrote:

Hmmm. I wouldn't say that the Controller is part of my model, but now I can send messages to the ArrayController telling it to add or remove guide objects in the array, where as before I was sending all this stuff to the array directly.

So, then, I need to maintain an NSMutableArray in my model as before and programatically link it to the NSArrayController I've instantiated in IB, or instantiate my NSMutableArray in IB and connect the content outlet of my NSArrayController to the NSMutableArray?


to the array, or to the model object that contains the array. there is no need to do this programmatically. you can do this in IB.


You only need to maintain the NSMutableArray, but be sure to add indexed accessor methods (see the KVC doc on accessor methods) to the class that contains the NSMutableArray. If you use those accessor methods to add/remove/replace items in the array, the NSArrayController keeps track of the changes.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Access to NSArrayController's NSMutableArray? (From: Dave Sopchak <email@hidden>)
 >Re: Access to NSArrayController's NSMutableArray? (From: mmalcolm crawford <email@hidden>)
 >Re: Access to NSArrayController's NSMutableArray? (From: Dave Sopchak <email@hidden>)

  • Prev by Date: Re: Access to NSArrayController's NSMutableArray?
  • Next by Date: Re: How Can i make my View as Sticky
  • Previous by thread: Re: Access to NSArrayController's NSMutableArray?
  • Next by thread: Free value transformers.
  • Index(es):
    • Date
    • Thread