Skip navigation.
 
mlNSOpenPanel Question
FROM : brooke
DATE : Thu Oct 24 19:22:33 2002

Any idea what I'm doing wrong? Please cc me on replies as I'm on the
digest.

Thanks, Brooke

//
- (void)addFileToTrack:(NSString *)filename{

    NSString *output = @"The following file was added to the track:";
    NSLog(output);
    NSLog(filename);
}

- (void)awakeFromNib
{
    NSOpenPanel *op;
    int answer;
    op = [NSOpenPanel openPanel];
    [op setAllowsMultipleSelection:YES];

    if (answer == NSOKButton){
        NSArray *filesToAdd = [op filenames];
        int i, count = [filesToAdd count];
        for (i=0;i<count; i++)
        {
            NSString *aFile = [filesToAdd objectAtIndex:i];
            [self [addFileToTrack aFile]];
        }
    }
}
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlNSOpenPanel Question brooke Oct 24, 19:22
mlRe: NSOpenPanel Question Steve Bird Oct 24, 19:40