cog/FileTree/FileTreeViewController.m

33 lines
683 B
Matlab
Raw Normal View History

2008-06-21 04:05:30 +00:00
//
// FileTreeController.m
// Cog
//
// Created by Vincent Spader on 2/17/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "PlaylistController.h"
#import "FileTreeViewController.h"
@implementation FileTreeViewController
- (IBAction)addToPlaylist:(id)sender
{
unsigned int index;
NSIndexSet *selectedIndexes = [outlineView selectedRowIndexes];
NSMutableArray *urls = [[NSMutableArray alloc] init];
for (index = [selectedIndexes firstIndex];
index != NSNotFound; index = [selectedIndexes indexGreaterThanIndex: index])
{
[urls addObject:[[outlineView itemAtRow:index] URL]];
}
[controller addToPlaylist:urls];
[urls release];
}
@end