cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

`associatedUserDefaultsKey = nil` doesn't unbind the previous key #136

Closed ninjaprox closed 5 years ago

ninjaprox commented 5 years ago

Steps to reproduce

shortcutView.associatedUserDefaultsKey = <key>
shortcutView.shortcutValue = <shortcut A>
shortcutView.associatedUserDefaultsKey = nil
shortcutView.shortcutValue = <shortcut B>

Expected

The data stored in NSUserDefaults is <shortcut A>.

Actual

The data stored in NSUserDefaults is <shortcut B>.

shpakovski commented 5 years ago

This is a nice bug (and fix). Thanks 👍