diff options
| author | Tomáš Znamenáček | 2015-01-08 12:00:53 +0100 |
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-08 12:00:53 +0100 |
| commit | 9b919cba51e4cd11b0c4424930d6c18a1baec73c (patch) | |
| tree | a8107774609d5f4263f7b79749d93e6c6ff2642d /Framework/MASDictionaryTransformer.h | |
| parent | a3a459b4e4e47bf18dccd5dc7f315389346e3d6c (diff) | |
| parent | ea69d5939511f61a7082ba1e8ff46d247862a3fa (diff) | |
| download | MASShortcut-9b919cba51e4cd11b0c4424930d6c18a1baec73c.tar.bz2 | |
Merge pull request #53 from zoul/2.0-candidate
Thank you very much!
Diffstat (limited to 'Framework/MASDictionaryTransformer.h')
| -rw-r--r-- | Framework/MASDictionaryTransformer.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Framework/MASDictionaryTransformer.h b/Framework/MASDictionaryTransformer.h new file mode 100644 index 0000000..eced1bb --- /dev/null +++ b/Framework/MASDictionaryTransformer.h @@ -0,0 +1,19 @@ +extern NSString *const MASDictionaryTransformerName; + +/** + @brief Converts shortcuts for storage in user defaults. + + User defaults can’t stored custom types directly, they have to + be serialized to @p NSData or some other supported type like an + @p NSDictionary. In Cocoa Bindings, the conversion can be done + using value transformers like this one. + + There’s a built-in transformer (@p NSKeyedUnarchiveFromDataTransformerName) + that converts any @p NSCoding types to @p NSData, but with shortcuts + it makes sense to use a dictionary instead – the defaults look better + when inspected with the @p defaults command-line utility and the + format is compatible with an older sortcut library called Shortcut + Recorder. +*/ +@interface MASDictionaryTransformer : NSValueTransformer +@end |
