Re: Key-Value-Observing and Collections
Re: Key-Value-Observing and Collections
- Subject: Re: Key-Value-Observing and Collections
- From: "David Symonds" <email@hidden>
- Date: Thu, 25 Oct 2007 23:30:28 +1000
On 10/25/07, Philip Mötteli <email@hidden> wrote:
>
> - (void)setGrades:(NSMutableArray *)theGrades;
> - (NSMutableArray *)grades;
> - (void)addGrade:(Grade *)aGrade;
You probably want your addGrade method to look like:
- (void)addGrade:(Grade *)aGrade
{
[self willChangeValueForKey:@"grades"];
[grades addObject:aGrade];
[self didChangeValueForKey:@"grades"];
}
Dave.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden