Re: Modifying the array of an NSArrayController
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.