Added a log window to show the mp4v2 log messages.

This commit is contained in:
Damiano Galassi committed 2014-10-24 09:07:58 +02:00
1 parent 28c89d2da7
commit 84ad50a434
7 files changed
+178 -4

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
//
// SBDebugLogController.m
// Subler
//
// Created by Damiano Galassi on 24/10/14.
//
//
#import "SBDebugLogController.h"
@interface SBDebugLogController ()
@property (assign) IBOutlet NSTextView *logView;
@end
@implementation SBDebugLogController
@synthesize logView;
- (instancetype)init
{
if ((self = [super initWithWindowNibName:@"SBDebugLogWindow"])) {
[self window];
}
return self;
}
- (void)windowDidLoad {
[super windowDidLoad];
}
- (void)log:(NSString *)string {
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:string];
[[self.logView textStorage] appendAttributedString:attributedString];
[attributedString release];
}
- (IBAction)clearLog:(id)sender {
[[self.logView textStorage] deleteCharactersInRange:NSMakeRange(0, [[self.logView textStorage] length])];
}
@end