You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Kentzo, many thanks for your modernisation efforts!
I am currently converting a project which used @ChrisForsythe's initial ShortcutRecorder to now use your new incarnation. It's a plugin for Apple's Mail.app, and I am hence handling the prefs file manually to make sure I don't "pollute" Apple's prefs file but store stuff in a separate file. Hence, I'm not binding to a NSUserDefaultsController, but need to set and get the hotkey and modifier flags between my SRRecorderControl and NSUserDefaults instances manually.
I can infer any new shortcut that was entered in the -shortcutRecorderDidEndRecording: delegate method by inspecting the objectValue just fine.
What I am lacking is a way of setting the hotkey and modifier when Mail.app is started and the plugin gets loaded, so that when the UI is opened for the first time, it shows the values that were read from the prefs file. With the old SRRecorderControl, I would do something like this:
But with your new code I don't seem to be able to achieve something similar?
The SRRecorderControl is created by code generated by Interface Builder, so in case you should eye adding a new method for this, it cannot be any sort of init method, but should be a dedicated one. Off the top of my head, - (void) setCodeAndFlags:(NSDictionary*)hotkey could e.g. spring to mind.
The text was updated successfully, but these errors were encountered:
[...]
The SRRecorderControl is created by code generated by Interface Builder, so in case you should eye adding a new method for this, it cannot be any sort of init method, but should be a dedicated one. Off the top of my head, - (void) setCodeAndFlags:(NSDictionary*)hotkey could e.g. spring to mind.
Actually, rethinking it, it would seem that something along the lines of - (void) setCode:(NSInteger)newCode andFlags:(NSUInteger)newFlags could make more sense; wouldn't require me to furnish stuff that's palatable to ShortcutRecorder 2's internal workings.
Hi @Kentzo, many thanks for your modernisation efforts!
I am currently converting a project which used @ChrisForsythe's initial ShortcutRecorder to now use your new incarnation. It's a plugin for Apple's Mail.app, and I am hence handling the prefs file manually to make sure I don't "pollute" Apple's prefs file but store stuff in a separate file. Hence, I'm not binding to a
NSUserDefaultsController
, but need to set and get the hotkey and modifier flags between mySRRecorderControl
andNSUserDefaults
instances manually.I can infer any new shortcut that was entered in the
-shortcutRecorderDidEndRecording:
delegate method by inspecting theobjectValue
just fine.What I am lacking is a way of setting the hotkey and modifier when Mail.app is started and the plugin gets loaded, so that when the UI is opened for the first time, it shows the values that were read from the prefs file. With the old
SRRecorderControl
, I would do something like this:But with your new code I don't seem to be able to achieve something similar?
The
SRRecorderControl
is created by code generated by Interface Builder, so in case you should eye adding a new method for this, it cannot be any sort of init method, but should be a dedicated one. Off the top of my head,- (void) setCodeAndFlags:(NSDictionary*)hotkey
could e.g. spring to mind.The text was updated successfully, but these errors were encountered: