no. I don't think that's how they think about it. NSDocument without UI is file presenter. But the most limited thing about NSDocument is it's tight to a window
Comments
Log in with your Bluesky account to leave a comment
It is all about UI, the primary things it does are all tied to UI semantics, from actions to new/edited markers, to undo. Itβs a classic controller that manages the model representing the file. π€·ββοΈ
It goes so far that they are first responders. You also have to read the first paragraph of the docs β¦
NSDocument is not all about UI. It's a model-controller class. is all about data with UI, therefore NSDocument without UI is NSFilePresenter. However I believe the idea was to NSDocument work without UI part - but that doesn't seems to be a thing anymore.
It's not a view, it's a model with a view. "the document is not the same as the file but is an object in memory that owns and manages the document data". The UI is an inherent part of its api. It could've been NSFilePresenter without UI part and that'd be more pure approach, in my opinion.
Comments
It goes so far that they are first responders. You also have to read the first paragraph of the docs β¦
This is a good intro, notice how the NSDocument controls the windows representing it, not the other way around.
The name is a little misleading for sure.
https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideForOSX/KeyObjects/KeyObjects.html