From bc56cdc907541cb633e8787424e0112ed856a5e9 Mon Sep 17 00:00:00 2001 From: Vadim Shpakovski Date: Sat, 10 Nov 2012 12:31:58 +0300 Subject: Now the component properly handles your trying to set another handler for an existing shortcut. Only the first assignable handler will be working, the second and other handlers all will be ignored. Also, previous workaround with calling performSelector:withObject:afterDelay: is removed, it seems to be working with an apprpriate use of objc_setAssociatedObject. --- MASShortcut+UserDefaults.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MASShortcut+UserDefaults.m') diff --git a/MASShortcut+UserDefaults.m b/MASShortcut+UserDefaults.m index 534830a..3bdbab9 100644 --- a/MASShortcut+UserDefaults.m +++ b/MASShortcut+UserDefaults.m @@ -73,7 +73,7 @@ - (void)userDefaultsDidChange:(NSNotification *)note { [MASShortcut removeGlobalHotkeyMonitor:self.monitor]; - [self performSelector:@selector(installHotKeyFromUserDefaults) withObject:nil afterDelay:0.0]; + [self installHotKeyFromUserDefaults]; } - (void)installHotKeyFromUserDefaults -- cgit v1.2.3