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];
|
[log setString: logText];
|
||||||
while ((data = [h availableData]) && [data length]) {
|
while ((data = [h availableData]) && [data length]) {
|
||||||
NSString * append = [[[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding] autorelease];
|
NSString * append = [[[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding] autorelease];
|
||||||
[logText appendString: append];
|
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||||
[log setString: logText];
|
[logText appendString: append];
|
||||||
[log scrollRangeToVisible: NSMakeRange([logText length], 0)];
|
[log setString: logText];
|
||||||
|
[log scrollRangeToVisible: NSMakeRange([logText length], 0)];
|
||||||
|
});
|
||||||
[pool release];
|
[pool release];
|
||||||
pool = [[NSAutoreleasePool alloc] init];
|
pool = [[NSAutoreleasePool alloc] init];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user