CocoaSplit/StreamServicePlugins/CSFileStreamServicePlugin/CSFileStreamServicePlugin/FileStreamServiceViewController.m
Zakk 5580ffaf16 Added MIDI command for instant record
File output type now has NSSavePanel dialog for choosing the output file/directory
2016-04-23 05:25:37 -04:00

46 lines
1,007 B
Objective-C

//
// FileStreamServiceViewController.m
// CSFileStreamServicePlugin
//
// Created by Zakk on 8/29/14.
// Copyright (c) 2014 Zakk. All rights reserved.
//
#import "FileStreamServiceViewController.h"
@interface FileStreamServiceViewController ()
@end
@implementation FileStreamServiceViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Initialization code here.
}
return self;
}
- (IBAction)chooseDestination:(id)sender
{
NSOpenPanel *panel = [NSOpenPanel openPanel];
panel.canChooseDirectories = YES;
panel.canCreateDirectories = YES;
panel.canChooseFiles = NO;
panel.allowsMultipleSelection = NO;
[panel beginWithCompletionHandler:^(NSInteger result) {
if (result == NSFileHandlingPanelOKButton)
{
self.serviceObj.fileName = panel.URL.path;
}
}];
}
@end