Document-based application design enables users to create and manage documents containing their data. In cocoa, this is enabled via the "document architecture" subsystem which provides inbuilt support for applications that manage documents.
Questions tagged [document-based]
112 questions
                    
                    25
                    
            votes
                
                2 answers
            
        What are the best uses of document stores?
I have been hearing a lot about document oriented data stores like CouchDB. I understand the uses of BigTable like stores such as Cassandra. After reading this question, I was wondering what the conditions would be to merit using a document store?
         
    
    
        Mantas Vidutis
        
- 16,376
- 20
- 76
- 92
                    21
                    
            votes
                
                12 answers
            
        Wait for [NSAlert beginSheetModalForWindow:...];
When I display an NSAlert like this, I get the response straight away:
int response;
NSAlert *alert = [NSAlert alertWithMessageText:... ...];
response = [alert runModal];
The problem is that this is application-modal and my application is document…
         
    
    
        dreamlax
        
- 93,976
- 29
- 161
- 209
                    19
                    
            votes
                
                2 answers
            
        Cocoa: Key down event on NSView not firing
I have made a custom NSView and have implemented the keyDown: method. However, when I press keys the method is never called. Do I have to register to receive those events? fyi, I am making a document based application and can handle this code…
         
    
    
        mtmurdock
        
- 12,756
- 21
- 65
- 108
                    11
                    
            votes
                
                2 answers
            
        Delete RavenDB collection
I need to delete a whole collection of documents in Raven DB. Deleting one by one (documents) is not a wise choice. Is there a way I can do this easily?
         
    
    
        ZVenue
        
- 4,967
- 16
- 61
- 92
                    11
                    
            votes
                
                2 answers
            
        UIDocument Creation on iOS 11: reader is not permitted to access the URL
Since iOS 11 I have encountered the following error every time I am creating a new document using UIDocument API:
[ERROR] Could not get attribute values for item…
         
    
    
        HuaTham
        
- 7,486
- 5
- 31
- 50
                    10
                    
            votes
                
                1 answer
            
        How to create custom Document Icon in iOS 14+ apps
I am trying to create a custom document icon for my multi-platform (iOS 14 - macOS Big Sur) app.
So, for macOS, it's pretty easy, I can either attach a legacy icon, or better, supply a combination of background, image and text, to composite a…
         
    
    
        Adam M.
        
- 85
- 10
                    10
                    
            votes
                
                1 answer
            
        How can I prevent making new Untitled document when Mac OS X document based application start up?
I'm making a new Mac OS X application. (not an iPhone app)
This is document-based application.
It shows a new "Untitled" document instance automatically when it starts up. How can I block this behavior? I wish my application show no window at start…
         
    
    
        eonil
        
- 83,476
- 81
- 317
- 516
                    8
                    
            votes
                
                4 answers
            
        Multiple Documents in a Single Window in Cocoa
I want to write an application which may have multiple documents in a single window via a tabbed interface.  Should I avoid the NSDocument architecture (the Cocoa Document-based Application template)?  As far as I can tell, it supports only one or…
         
    
    
        titaniumdecoy
        
- 18,900
- 17
- 96
- 133
                    8
                    
            votes
                
                1 answer
            
        Tutorial/example of a minimal document-based app
I'm trying to understand how the things in Cocoa works but I'm struggling with one thing. I saw http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html and http://casperbhansen.wordpress.com/2010/08/15/dev-tip-nibless-development/ and I…
         
    
    
        Ecir Hana
        
- 10,864
- 13
- 67
- 117
                    7
                    
            votes
                
                3 answers
            
        How do I create an import-only document type in Cocoa?
There's a file type my application import but not save. I've added an entry to the document types and set it to read-only, but that doesn't yield the import behaviour that I'm looking for. Instead, my app will just open the file and when I save the…
         
    
    
        Sijmen Mulder
        
- 5,767
- 3
- 22
- 33
                    7
                    
            votes
                
                1 answer
            
        In a SwiftUI Document App, how to save a document from within a function
The current version of Xcode (version 12.5.1) provides a template for a Document Based App for macOS providing the following document model:
struct MyDocument: FileDocument {
    var text: String
    init(text: String = "Hello, world!") {
       …
        user16524160
                    7
                    
            votes
                
                2 answers
            
        Where do you put cleanup code for NSDocument sub-classes?
I have a document-based application and I have sub-classed NSDocument and provided the required methods, but my document needs some extensive clean-up (needs to run external tasks etc). Where is the best place to put this? I have tried a few…
         
    
    
        dreamlax
        
- 93,976
- 29
- 161
- 209
                    7
                    
            votes
                
                1 answer
            
        Starting a Cocoa document-based application shows selection window first
This seems like it should be easy yet I must be missing something.  I have a document-based application.  I have also built a new XIB that has a NSTableView and three buttons on it that I intend to display a list of previous files.  I wish this XIB…
         
    
    
        Rob
        
- 4,149
- 5
- 34
- 48
                    6
                    
            votes
                
                1 answer
            
        Lion Resume when Closing Docs without Quitting App
I'm dipping my feet into Cocoa for the first time.
Here's a simple question. OS X Lion supports Resuming of window state when an app is terminated and relaunched. Okay, good and fine.
But for document-based apps, can the same Resume feature also…
         
    
    
        joshua-choi
        
- 106
- 2
                    5
                    
            votes
                
                0 answers
            
        Onboarding screen at launch of SwiftUI document-based app
Is there anyway at all, to show an onboarding screen at the launch of a SwiftUI document-based app, before the file picker screen appears?
What I can do now, is to show the onboarding screen AFTER user creates a new file, or opens an existing file,…
         
    
    
        Sami Almalki
        
- 588
- 2
- 17