document-based

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 based. I display the alert in the current document's window by using sheets, like this: ...

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 different methods such as: close close: canCloseDocumentWithDelegate:shouldCloseSelector:contex...

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 original file is overwritten in my own file format. How to set up my document or document...

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 more window per document but not vice versa. I have been wrestling with this question for ...

Document-based app in one window

I need to develop a simple document-based application but using only one window, the documents should open in views separated by tabs. How can I achieve it? ...

Cocoa document-based application with multiple document types

Hi! I want to build a document-based app in Cocoa but so that it can create and handle different types of documents. Think Word, Excel, Powerpoint all in one application, only much simpler. But every window will be different based on the type of document. For storage I will use CoreData. I think of adding a field that specifies the typ...

Is it better to use a relational database or document-based database for an app like Wufoo?

I'm working on an application that's similar to Wufoo in that it allows our users to create their own databases and collect/present records with auto generated forms and views. Since every user is creating a different schema (one user might have a database of their baseball card collection, another might have a database of their recipes...

Document Based Application, preinitialize window (enter serial, buy, trial)

I need to create several windows before NSDocument is loaded, or create a window that blocks NSDocument window and top menu. I tried several solutions - but they didn't work right. modal window, one after another. there were some problems with Async URLConnection, and some other problems with my NSDocument content. I created custom M...

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 up. ...

Cocoa document-based app: Notification not always received by observer

Hi, I hope somebody can help with my notification problem. I have a notification which looks to be set up correctly but it isn’t delivered as expected. I am developing a document based app. The delegate/ document class posts the notification when it reads from a saved file: [[NSNotificationCenter defaultCenter] postNotificationName:n...

Cocoa CoreData and non-Document-Based Application

Hi all, i have a Problem wich drives me crazy... I want to "write" a Cocoa CoreData Application, write is not the exact term, because the Application should be created with Bindings. It was no Problem to create a Document-Based Application, it works fine. But i want a Non-Document-Based Application, so I thought "Do the same like at th...

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? ...

How do I adjust the scrollers in a newly opened document?

Hey guys, I’m writing a document-based Cocoa application with a custom view that does the whole presentation of the document to the user. I finally got scrolling to work, and it feels great. When I open a previously saved document, though, the scrollers remain blank and useless until I resize the window — even if the document view’s f...

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 to be displayed instead of the document window when the application first starts. Once th...