Re: Question on NSTableViewDataSource Protocol

2014-05-20 Thread Jerry Krinock
On 2014 May 18, at 14:38, Varun Chandramohan varun.chandramo...@wontok.com wrote: so lets say I avoid [_tableContents removeAllObjects] Indeed. I think that the vote in this thread is now about 6 to 0 *against* using -removeAllObjects :) Could I do something like this before removing the

Re: Question on NSTableViewDataSource Protocol

2014-05-18 Thread Varun Chandramohan
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

Re: Question on NSTableViewDataSource Protocol

2014-05-16 Thread Graham Cox
On 16 May 2014, at 11:18 am, Varun Chandramohan varun.chandramo...@wontok.com 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

Question on NSTableViewDataSource Protocol

2014-05-15 Thread Varun Chandramohan
Hi All, I was playing around with dragging items into NSTableView and I ran into a interesting problem. When I drag an item into my table, the following delegate gets called. - (BOOL)tableView:(NSTableView *)tableView acceptDrop:(idNSDraggingInfo)info row:(NSInteger)row

Re: Question on NSTableViewDataSource Protocol

2014-05-15 Thread Jerry Krinock
On 2014 May 15, at 18:18, Varun Chandramohan varun.chandramo...@wontok.com wrote: This is bad idea as I am doing this inside performInsertWithDragInfo before I return from tableView:(NSTableView *)tableView acceptDrop:(idNSDraggingInfo)info row:(NSInteger)row