aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMCarbonEvent.m
diff options
context:
space:
mode:
Diffstat (limited to 'AppKit/GTMCarbonEvent.m')
-rw-r--r--AppKit/GTMCarbonEvent.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/AppKit/GTMCarbonEvent.m b/AppKit/GTMCarbonEvent.m
index 235306e..e18551e 100644
--- a/AppKit/GTMCarbonEvent.m
+++ b/AppKit/GTMCarbonEvent.m
@@ -343,6 +343,12 @@ const OSType kGTMCarbonFrameworkSignature = 'GTM ';
@implementation GTMCarbonEventHandler
+-(void)dealloc {
+ if (eventHandler_) {
+ verify_noerr(RemoveEventHandler(eventHandler_));
+ }
+ [super dealloc];
+}
// Does our delegate respond to eventHandler:receivedEvent:handler:
//
// Returns:
@@ -621,7 +627,7 @@ CantCreateKey:
data:&keyID];
if (handled) {
GTMCarbonHotKey *hotkey;
- GTM_FOREACH_OBJECT(hotkey, hotkeys_) {
+ for (hotkey in hotkeys_) {
if ([hotkey matchesHotKeyID:keyID]) {
EventKind kind = [event eventKind];
BOOL onKeyDown = [hotkey onKeyDown];