Re: NSTableView doesn't show data until I click on a header
Re: NSTableView doesn't show data until I click on a header
- Subject: Re: NSTableView doesn't show data until I click on a header
- From: mmalc Crawford <email@hidden>
- Date: Sun, 29 Apr 2012 19:56:12 -0700
On Apr 29, 2012, at 9:22 AM, Koen van der Drift <email@hidden> wrote:
> So for future reference, my data model is an NSMutableArray. Instead of adding objects by calling addObject, I need to call it as follows:
>
> - (void)addMyObject:(MyObject *)obj
> {
> NSMutableArray *temp = [self mutableArrayValueForKey: @"myArray"];
> [temp addObject: obj];
> }
>
Is there any reason not to implement the appropriate KVC accessor methods for myArray?
<https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/AccessorConventions.html#//apple_ref/doc/uid/20002174-BAJEAIEE>
(See also <https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/Articles/KVOCompliance.html#//apple_ref/doc/uid/20002178-BAJEAIEE>.)
mmalc
_______________________________________________
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