Elektrine lite

← Feed

@isaiah@mastodon.social

Post #831026

2026-03-29 02:01 UTC

@troz@mastodon.social per window isn’t really sufficient — unless the document is mapped to a specific window. what i want is basically Xcode. if i open a project, i want the the same files open, the same left sidebar tab should be selected, as the last time i viewed that project. this is neither a user defaults sort of thing (which is global, nor the settings of a particular UI element) nor is it part of the NSDocument model. it’s the stuff in the xcuserdata of each xcode project.

Replies (1)

  • @provuejim@techhub.social 2026-03-29 07:22

    @isaiah@mastodon.social @troz@mastodon.social I suspect that Xcode does not use NSDocument, I think it predates that API. It probably has a bespoke implementation all its own. I don’t think you can duplicate that behavior with NSDocument. In Panorama, I just save that information as part of the document. If you want it to automatically save even if nothing else changes, it has to be hooked into the undo say. I didn’t do that, so metadata changes aren’t saved unless something else is changed, or if the user explicitly saves. Never had a single complaint about this behavior.

    Open ##2272218