Re: Question on NSTableViewDataSource Protocol
Re: Question on NSTableViewDataSource Protocol
- Subject: Re: Question on NSTableViewDataSource Protocol
- From: Varun Chandramohan <email@hidden>
- Date: Sun, 18 May 2014 21:38:20 +0000
- Thread-topic: Question on NSTableViewDataSource Protocol
Interesting, so lets say I avoid [_tableContents removeAllObjects] but I
have to change the data source, may be add new entry or remove 1 entry.
What will be the difference between removing 1 entry and all
entry(objects) from the source? I mean, what can I do to remove an entry
which may be a valid row in table code? Could I do something like this
before removing the objects? [ltableView removeRowsAtIndexes:indexes
withAnimation:NSTableViewAnimationSlideDown];
Regards,
Varun
On 16/05/2014 4:45 pm, "Graham Cox" <email@hidden> wrote:
>
>On 16 May 2014, at 11:18 am, Varun Chandramohan
><email@hidden> wrote:
>
>> [_tableContents removeAllObjects];
>
>
>I wouldn't do this, because it invalidates the value of 'row', which may
>be assumed by the table code to remain valid. Implementation details may
>change on different systems, and so this might be OK on 10.9, but fail on
>earlier. The assertion seems definitely to do with an invalid row index.
>
>--Graham
>
>
_______________________________________________
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