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

Re: Modifying the array of an NSArrayController


  • Subject: Re: Modifying the array of an NSArrayController
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 6 Nov 2003 20:47:44 -0800

On Nov 6, 2003, at 2:27 PM, Reni Puls wrote:
In [MyDocument addItem:] I add a new item to the Array:
[array addObject:[NSDictionary dictionaryWithObject:@"New Item" forKey:@"string"]];

You should implement and use the mutable array accessors...

- (IBAction)addItem:(id)sender;
- (IBAction)refresh:(id)sender;

Although it's not clear why you're implementing addItem here? You should typically just connect to the array controller. In this case you can subclass NSArrayController.

<http://cocoa.mamasam.com/COCOADEV/2003/11/1/75875.php>
<http://cocoa.mamasam.com/COCOADEV/2003/11/1/76032.php>
<http://cocoa.mamasam.com/COCOADEV/2003/11/1/76054.php>

mmalc
_______________________________________________
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: René Puls <email@hidden>
References: 
 >Modifying the array of an NSArrayController (From: René Puls <email@hidden>)
 >Re: Modifying the array of an NSArrayController (From: Henrik Wittland <email@hidden>)
 >Re: Modifying the array of an NSArrayController (From: René Puls <email@hidden>)
 >Re: Modifying the array of an NSArrayController (From: Scott Anguish <email@hidden>)
 >Re: Modifying the array of an NSArrayController (From: René Puls <email@hidden>)

  • Prev by Date: Re: Help with Undo and MVC
  • Next by Date: Cannot Find NSObjectController on Palette
  • Previous by thread: Re: Modifying the array of an NSArrayController
  • Next by thread: Re: Modifying the array of an NSArrayController
  • Index(es):
    • Date
    • Thread