Ok, I'm building a document-based application in Cocoa, and the document file type is actually a package. Inside this package is an XML configuration file, an SQLite database, and a zip file that is loaded at runtime. Now the only thing that has changed is the XML settings file, as others can be recreated at runtime.
Each of these packages will have one and only one window, so my desire is to use the documentation. These files can also be copied, renamed, moved, etc., Like any other file that is part of such an architecture.
But I completely lost how to implement this in the Documentation Framework! It seems that wherever I look in the documents, he always talks about the representations in the memory of the files that you then write using the path provided to you in one of the NSDocument overrides (since Cocoa can move it, etc.). But again, I am using the SQLite database, which is located on disk, not in memory.
I looked through increasingly sophisticated methods that could still give me things like checking the status of documents, opening and saving files, etc., but I can’t find anything that just says: “Here is the URL of the file. .. Open it, as it seems to you, "although I really approached the level of delegation of the application, at least for opening.
So, suppose it works as expected. How to implement saving / saving - how do I want to control everything that is written to disk or not? I do not want (can not) do with data structures or the like. I just want to get the psth that the user selects in the Save As dialog box (for new) and will be able to write what I need. Simply. But again, the developer.apple.com 50-page document-based architecture document tells me where to overload a lot of things, but each of them seems to be associated with some representation of the document in mind, which again is not what mine package. Technically, only the internal XML file is what would be attached to the document. Everything else is just support.
So? Anyone? Consonants?
Mark