• 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
Modifying the array of an NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modifying the array of an NSArrayController


  • Subject: Modifying the array of an NSArrayController
  • From: René Puls <email@hidden>
  • Date: Thu, 6 Nov 2003 15:57:58 +0100

Hello all,

I am still trying to understand some basic concepts of the new controller layer.

If I set an NSMutableArray as the content of an NSArrayController, can I still make changes to this array and rely on the controller to notice them? I just wrote a sample program which did this, and the controller would not notice any added objects (by updating the associated views) until I called [arrayController rearrangeObjects].

Is this the wrong way to do it? Do I have to use the controller's own addObject: method for this? I thought the point of the controller layer was to update the view more or less automatically when the something in the model is changed. The NSArrayController seems to create its own array if I don't use setContent:, but I would prefer to "own" the array myself and keep controller and model separated.

Kind regards,
Rene Puls
_______________________________________________
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.

  • Follow-Ups:
    • Re: Modifying the array of an NSArrayController
      • From: Henrik Wittland <email@hidden>
  • Prev by Date: Re: Unclear on NSView's isOpaque concept (and optimization in general)
  • Next by Date: Disabling the Run <appname> window in XCode
  • Previous by thread: Re: Unclear on NSView's isOpaque concept (and optimization in general)
  • Next by thread: Re: Modifying the array of an NSArrayController
  • Index(es):
    • Date
    • Thread