Maintaining a menu gathered across all the open documents could be tricky. Here’s a simple solution using UserDefaults and NotificationCenter.
AppleScript
The odd behaviour of some apps, which quit on their own, but hang around as zombies, and the long battle trying to make sense of logs.
Drawing in a graphics view shouldn’t be as hard as it seems. And how making custom ToolTips is simple, when you know how.
Dictionaries are valuable, perhaps vital for working with property lists, but seldom as flat as examples suggest. Here are some nested examples in real code.
Using Swift 4 for a classic scripting task: copying and restructuring files and folders, here to create a logarchive bundle.
How my apps were correctly signed, but using the wrong certificate. They passed all tests here, but would not come out of quarantine normally on other systems.
NSDocument is based on the data stored in the data fork of a file. Could it be modified to work with xattrs instead? And dipping my toes into NSTableView.
Using wrappers to call C functions which give direct access to xattrs, handling throws, and converting arbitrary Data to Strings.
Working with extended attributes in Swift. They’re straightforward using shell commands, but that is not the best way ahead.
How much more difficult is it to write your own code to handle user preferences, rather than letting UserDefaults handle them?
