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: Mon, 30 Apr 2012 12:27:30 -0400
On Mon, Apr 30, 2012 at 12:03 PM, Quincey Morris
<email@hidden> wrote:
> What's at stake here is KVO compliance. If you have a class MyClass with an
> indexed (array) property "things", you can implement the indexed mutable
> accessors -- basically 'insertObject:inThingsAtIndex:' and
> 'removeObjectFromThingsAtIndex:'. (Note that the property name should be a
> plural noun for best readability.) Then, if you maintain the underlying
> array's contents *only* by calling these two methods -- either internally in
> the MyClass implementation, or externally from client objects after adding
> the methods to the MyClass public interface -- your MyClass class is fully
> KVO-compliant for the "things" property.
Very nice explanation, thanks.
I am using an NSMutableArray to store the myObjects, the table
displays several properties of each object in seperate columns. So
the order in which the objects are stored in the array is not
critical, they will be ordered once displayed in the table and the
user can select which column to use for ordering. Therefore I don't
think I need to use the 'indexed mutable accessors', but the 'mutable
unordered accessors' as discussed in the same link from mmalc. Am I
correct here?
- 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