mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Log on main thread
This commit is contained in:
parent
423250f8cd
commit
8cdf61cf07
|
@ -45,10 +45,11 @@
|
|||
[log setString: logText];
|
||||
while ((data = [h availableData]) && [data length]) {
|
||||
NSString * append = [[[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding] autorelease];
|
||||
[logText appendString: append];
|
||||
[log setString: logText];
|
||||
[log scrollRangeToVisible: NSMakeRange([logText length], 0)];
|
||||
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
[logText appendString: append];
|
||||
[log setString: logText];
|
||||
[log scrollRangeToVisible: NSMakeRange([logText length], 0)];
|
||||
});
|
||||
[pool release];
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user