Update to ARC and 10.9 deployment target.
This commit is contained in:
1 parent
e59092536b
commit
ac05736fed
67 files changed
+1240
-1694
No files matched your search
@@ -11,7 +11,7 @@
|
||||
|
||||
@interface SBLogWindowController ()
|
||||
|
||||
@property (nonatomic, assign) IBOutlet NSTextView *logView;
|
||||
@property (nonatomic, unsafe_unretained) IBOutlet NSTextView *logView;
|
||||
@property (nonatomic, readonly) SBLogger *logger;
|
||||
|
||||
@end
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
- (instancetype)init {
|
||||
if ((self = [super initWithWindowNibName:@"SBLogWindow"])) {
|
||||
(void)[self window];
|
||||
(void)self.window;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -34,7 +34,7 @@
|
||||
self = [self init];
|
||||
|
||||
if (self) {
|
||||
_logger = [logger retain];
|
||||
_logger = logger;
|
||||
_logger.delegate = self;
|
||||
}
|
||||
|
||||
@@ -44,22 +44,14 @@
|
||||
- (void)writeToLog:(NSString *)string {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:string];
|
||||
[[self.logView textStorage] appendAttributedString:attributedString];
|
||||
[attributedString release];
|
||||
[(self.logView).textStorage appendAttributedString:attributedString];
|
||||
});
|
||||
}
|
||||
|
||||
- (IBAction)clearLog:(id)sender {
|
||||
[[self.logView textStorage] deleteCharactersInRange:NSMakeRange(0, [[self.logView textStorage] length])];
|
||||
[(self.logView).textStorage deleteCharactersInRange:NSMakeRange(0, (self.logView).textStorage.length)];
|
||||
[self.logger clearLog];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_logger release];
|
||||
_logger = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user