summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Dudek2015-04-14 15:43:37 +0200
committerMichał Dudek2015-04-14 15:43:37 +0200
commit3beba90312d513672bb0eadda71d29a7736e9754 (patch)
tree5c8141cfe1e7b0b7df8cf88610d0bc6ef452005b
parent80a9663506c3ed9b861b6ae6fd88a1e13d31ee55 (diff)
downloadDDHotKey-3beba90312d513672bb0eadda71d29a7736e9754.tar.bz2
Added sendAction call on hotkey event so that selector can be specified in the IB and respont to changes in the field.
-rw-r--r--DDHotKeyTextField.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/DDHotKeyTextField.m b/DDHotKeyTextField.m
index 7305e17..4f3da2b 100644
--- a/DDHotKeyTextField.m
+++ b/DDHotKeyTextField.m
@@ -96,6 +96,7 @@ static DDHotKeyTextFieldEditor *DDFieldEditor(void) {
NSString *str = DDStringFromKeyCode(_originalHotKey.keyCode, _originalHotKey.modifierFlags);
self.textStorage.mutableString.string = [str uppercaseString];
}
+ [self.hotKeyField sendAction:self.hotKeyField.action to:self.hotKeyField.target];
[self.window makeFirstResponder:nil];
return;
}
@@ -105,6 +106,7 @@ static DDHotKeyTextFieldEditor *DDFieldEditor(void) {
self.hotKeyField.hotKey = [DDHotKey hotKeyWithKeyCode:event.keyCode modifierFlags:flags task:_originalHotKey.task];
NSString *str = DDStringFromKeyCode(event.keyCode, flags);
[self.textStorage.mutableString setString:[str uppercaseString]];
+ [self.hotKeyField sendAction:self.hotKeyField.action to:self.hotKeyField.target];
}
}