diff options
| author | Tomáš Znamenáček | 2014-08-07 10:47:34 +0200 | 
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-07 15:42:21 +0100 | 
| commit | 942bbe849ed245d8b2e9afcb0a61d66b23beaef9 (patch) | |
| tree | 2cc9e066d84355099d2334bceac6fa1fb7f5d1b8 /Framework/MASDictionaryTransformer.h | |
| parent | 756601488fe195b0b14a8ac9c3c418140d5845f0 (diff) | |
| download | MASShortcut-942bbe849ed245d8b2e9afcb0a61d66b23beaef9.tar.bz2 | |
Added a custom transformer to store shortcuts as dictionaries.
The MASDictionaryTransformer class is used to save shortcuts to
user defaults (and load them back) using a simple dictionary. The
value stored in the user defaults looks like this:
$ defaults read com.shpakovski.mac.Demo
{
    MASDemoShortcut =     {
        keyCode = 15;
        modifierFlags = 1048576;
    };
    …
}
This storage format has got the distinct advantage of being compatible
with the format used by Shortcut Recorder. In order to use it, you
have to set proper binding options for MASShortcutBinder and the
recorder control (MASShortcutView).
Diffstat (limited to 'Framework/MASDictionaryTransformer.h')
| -rw-r--r-- | Framework/MASDictionaryTransformer.h | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/Framework/MASDictionaryTransformer.h b/Framework/MASDictionaryTransformer.h new file mode 100644 index 0000000..94c5bc9 --- /dev/null +++ b/Framework/MASDictionaryTransformer.h @@ -0,0 +1,2 @@ +@interface MASDictionaryTransformer : NSValueTransformer +@end | 
