- (BOOL)performDragOperation
id <NSDraggingInfo>)sender
{
//Get the files from the drop
NSArray *files = [[NSMutableArray alloc] init];
files = [[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType];
/*
//store filepath into string
NSString *arrayElements = ([[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType]);
NSLog(@"value of arrayElements: %@", arrayElements);
//add new elements to array
storeArray = [[NSMutableArray alloc] init];
//[storeArray addObject: arrayElements];*/
storeArray = [[NSMutableArray alloc] init];
int i = 0;
int filesCount = [files count];
for(i=0; i <filesCount; i++)
{
[storeArray addObjectsFromArray: [files objectAtIndex:i]];
}
i am gettin an warning here saying that NSArray may not respond to addObjectsFromArray.
I am trying to get all the filepaths in the files array. But everytime when i drag a new file into the files array it gets overwritten. Therefore i am trying to consolidate all the files in the files array by copying them into the storeArray. Sorry for bad english.
Appreciate your help thanks.
{
//Get the files from the drop
NSArray *files = [[NSMutableArray alloc] init];
files = [[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType];
/*
//store filepath into string
NSString *arrayElements = ([[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType]);
NSLog(@"value of arrayElements: %@", arrayElements);
//add new elements to array
storeArray = [[NSMutableArray alloc] init];
//[storeArray addObject: arrayElements];*/
storeArray = [[NSMutableArray alloc] init];
int i = 0;
int filesCount = [files count];
for(i=0; i <filesCount; i++)
{
[storeArray addObjectsFromArray: [files objectAtIndex:i]];
}
i am gettin an warning here saying that NSArray may not respond to addObjectsFromArray.
I am trying to get all the filepaths in the files array. But everytime when i drag a new file into the files array it gets overwritten. Therefore i am trying to consolidate all the files in the files array by copying them into the storeArray. Sorry for bad english.
Appreciate your help thanks.