How to use NSTableView's selectedRowIndexes?
Posted
by Jakub Lédl
on Stack Overflow
See other posts from Stack Overflow
or by Jakub Lédl
Published on 2010-05-16T10:07:47Z
Indexed on
2010/05/16
10:10 UTC
Read the original article
Hit count: 322
Hi guys, I'm just learning some basic programming in Objective C and Cocoa. I'm trying to get some data from NSTableView. Based on what I read in one tutorial, I wrote this:
NSArray * items = [[itemsTableView selectedRowEnumerator] allObjects];
But then I learned that selectedRowEnumerator
was deprecated already in 10.3 Panther and that I should use selectedRowIndexes
.
The problem is, I didn't find how to actually use the returned NSIndexSet
to achieve the same result as with code written above.
So, If anyone could give me a tip, I would be very grateful. Thanks.
© Stack Overflow or respective owner