aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAlertSheets.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-03-20 22:07:49 +0000
committerrowanbeentje <rowan@beent.je>2010-03-20 22:07:49 +0000
commita4ee82dd8446b3374adac9f826118ab6c8a108a9 (patch)
tree26fdb41583773afd3dc1dcc10c6fd26e3c190129 /Source/SPAlertSheets.m
parent57d35fbecd2517fe8b1914d1f2335be06e2a8b17 (diff)
downloadsequelpro-a4ee82dd8446b3374adac9f826118ab6c8a108a9.tar.gz
sequelpro-a4ee82dd8446b3374adac9f826118ab6c8a108a9.tar.bz2
sequelpro-a4ee82dd8446b3374adac9f826118ab6c8a108a9.zip
- Add a new SPMainThreadTrampoline NSObject category, allowing all NSObjects to easily proxy commands onto the main thread with any number and type of arguments.
- Use the new trampoline and other thread safety tweaks to hopefully address a number of what appear to be threading issues: http://log.sequelpro.com/view/20 http://log.sequelpro.com/view/32 http://log.sequelpro.com/view/41 http://log.sequelpro.com/view/42 http://log.sequelpro.com/view/55 http://log.sequelpro.com/view/64 http://log.sequelpro.com/view/65 http://log.sequelpro.com/view/66
Diffstat (limited to 'Source/SPAlertSheets.m')
-rw-r--r--Source/SPAlertSheets.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPAlertSheets.m b/Source/SPAlertSheets.m
index 2505fb61..9692e848 100644
--- a/Source/SPAlertSheets.m
+++ b/Source/SPAlertSheets.m
@@ -22,6 +22,8 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
+#import "SPMainThreadTrampoline.h"
+
/**
* Provide a very simple alias of NSBeginAlertSheet with one difference:
* printf-type format strings are no longer supported within the "msg"
@@ -52,5 +54,5 @@ void SPBeginAlertSheet(
contextInfo,
[msg stringByReplacingOccurrencesOfString:@"%" withString:@"%%"]
);
- [docWindow makeKeyWindow];
+ [[docWindow onMainThread] makeKeyWindow];
}