mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Added changedFileWrapper to avoid annoying warnings
This commit is contained in:
parent
8a9e650e75
commit
44f4f86173
|
@ -54,6 +54,7 @@
|
|||
- (NSString *) baseName;
|
||||
- (NSURL *) fileURLWithExtension:(NSString*)extension;
|
||||
- (NSTask *) taskWithLaunchPath:(NSString *)path arguments:(NSArray *)args;
|
||||
- (void) changedFileWrapper;
|
||||
- (void) willChangeSong;
|
||||
- (void) didChangeSong;
|
||||
|
||||
|
|
|
@ -316,6 +316,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) changedFileWrapper
|
||||
{
|
||||
if (NSURL * url = [self fileURL])
|
||||
if (NSDate * modDate =
|
||||
[[[NSFileManager defaultManager] fileAttributesAtPath:[url path]
|
||||
traverseLink:YES]
|
||||
objectForKey:NSFileModificationDate])
|
||||
[self setFileModificationDate:modDate];
|
||||
}
|
||||
|
||||
- (NSTask *) taskWithLaunchPath:(NSString *)launch arguments:(NSArray *)args;
|
||||
{
|
||||
NSTask * task = [[NSTask alloc] init];
|
||||
|
@ -372,6 +382,7 @@
|
|||
} else {
|
||||
NSBeep();
|
||||
}
|
||||
[self changedFileWrapper];
|
||||
}
|
||||
|
||||
- (IBAction) play:(id)sender
|
||||
|
@ -379,6 +390,7 @@
|
|||
NSError * err;
|
||||
[self writeToURL:[self fileURLWithExtension:@"mid"]
|
||||
ofType:@"VLMIDIType" error:&err];
|
||||
[self changedFileWrapper];
|
||||
VLSoundOut::Instance()->PlayFile(
|
||||
CFDataRef([NSData dataWithContentsOfURL:
|
||||
[self fileURLWithExtension:@"mid"]]));
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
NSError * err;
|
||||
NSURL * mmaURL = [self fileURLWithExtension:@"mma"];
|
||||
[self writeToURL: mmaURL ofType:@"VLMMAType" error:&err];
|
||||
[self changedFileWrapper];
|
||||
|
||||
NSString * launch =
|
||||
[mainBundle pathForResource:@"mmaWrapper" ofType:@""
|
||||
|
@ -50,4 +51,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)mmaDone:(NSNotification *)notification {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
int status = [[notification object] terminationStatus];
|
||||
if (!status) {
|
||||
;
|
||||
} else {
|
||||
NSBeep();
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue
Block a user