Post #831093
2026-03-29 02:13 UTC
@tapforms@mastodon.social if you do save it to the project bundle, even when the NSDocument model hasn’t changed, can i ask how you decide when to write that file?
i can do it, but it seems like there’s a a potential race condition. when the user chooses save the project bundle will be replaced atomically i think — thus nuking any extra files in the bundle.
Replies (1)
-
@tapforms@mastodon.social 2026-03-29 07:34
@isaiah@mastodon.social I save whenever I call defaults.setXxxFor(key:). Just a plist write to the file system within the document bundle folder. DocumentProperties.plist is the file I wrote to. And since my app is a database app I write to the database all the time as users make changes. Not just by pressing save. My document is never really in a dirty state.