Login
You're viewing the code4lib.social public feed.
  • Aug 26, 2026, 3:30 PM

    Is there a good, modern, minimal AppKit NSDocument sample app out there? My wee app is missing a bunch of basic functionality and I’d love to fill in the gaps. (Like properly supporting versions, etc.)

    💬 1🔄 0⭐ 0

Replies

  • Aug 26, 2026, 3:56 PM

    @jeffwatkins Pretty sure Versions just requires autosavesInPlace. Then you can get most of the basic functionality just by hooking up menu items to the relevant NSDocument selectors and relying on the responder chain.

    (my add() function in the example is just a convenience for building menu items.)

    Image attached toot
    Image attached toot
    💬 1🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • Aug 26, 2026, 4:18 PM

    @jeffwatkins actually there's quite a few xibs in this app (all my inspector panes, preferences, etc). But the main document structure is in code. No particular reason: it grew out of a toy prototype and I never revisited that decision.

    I dislike storyboards though. IMO they try to couple navigation/flow into layout, in a way that doesn't work for me.

    💬 0🔄 0⭐ 0
  • Aug 26, 2026, 4:24 PM

    @jeffwatkins fwiw, McKinley was built because I was annoyed at creating SF Symbols for another of my apps.

    While building McKinley, I've been super frustrated at bugs and pain points in Interface Builder (mostly related to NSGridView)… I must tell myself I'm not allowed to build an Interface Builder replacement…

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0