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've read in a tutorial, I wrote this:
NSArray * items = [[itemsTableView selected ROEnumerator] allObjects ];
But then I learned that selected ROEumerumer
was previously demoted in 10.3 Panther and I should use selectedRowIndexes
.
The problem is, I do not know that the code actually returned to use the NISINXXset code is not to get the same result as the code given above.
So, if someone can give me the tip, I would be very grateful. Thank you.
You can find a NSIndexSet
from the indexed medium like this: < / P>
- (zero) goThroughIndexSet: (NSIndexSet *) anIndexSet {NSUInteger idx = [anIndexSet firstIndex]; While (idx! = NSNotFound) {// "idx" works with NSLog (@ "current index is% u", idx); // set idx = get the next index [[indiexset indexGreatin index: idx]; } // all full}
Comments
Post a Comment