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: Koen van der Drift <email@hidden>
- Date: Sun, 29 Apr 2012 12:22:08 -0400
On Apr 28, 2012, at 6:21 PM, Keary Suska wrote:
> Are you updating the model data in a KVO-compliant way?
Bingo! Thanks for pointing that out, I kept looking at my connections in IB, and forgot about the actual code.
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];
}
And the same for all the other array changing methods.
It all works fine now.
- Koen.
_______________________________________________
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