NSOutlineView (BSMultipleRowFetch)
Language: Objective-C, Author: Michele Balistreri
License: Public domain
A very simple NSOutlineView category which adds a method to fetch all the rows specified in an NSIndexSet with a single method call.
NSOutlineView (BSMultipleRowFetch) source preview
#import "NSOutlineView+BSMultipleRowFetch.h" @implementation NSOutlineView (BSMultipleRowFetch) - (NSArray *)itemsAtRows:(NSIndexSet *)indexes { NSMutableArray *items = [NSMutableArray array]; unsigned int i = [indexes firstIndex]; while(i != NSNotFound) { [items addObject:[self itemAtRow:i]]; i = [indexes indexGreaterThanIndex:i]; } return [NSArray arrayWithArray:items]; } @end
NSOutlineView (BSMultipleRowFetch) header preview
#import <Cocoa/Cocoa.h> @interface NSOutlineView (BSMultipleRowFetch) - (NSArray *)itemsAtRows:(NSIndexSet *)indexes; @endDownload Archive
Compatible with:
- Mac OS X 10.3
- Mac OS X 10.4 PPC
- Mac OS X 10.4 Intel
- Mac OS X 10.5 PPC
- Mac OS X 10.5 Intel
Comments
Comment feed
