nsdocument

iPhone save records to a file permanently

Hi Friends, I have few records( with many fields) which are to be saved permanently. When I open my application next time , I need show saved files. I also need to replace few records sometimes. Can anybody guide towards to the best aproach with sample code? Thanks in advance. Regards, Malleswar ...

The correct file location to store a plist on device.

What is the correct filepath to store a plist on the device. I read this in a tutorial which will work for the computer, would like to know the file location for the device. // write xml representation of dictionary to a file [dictionary writeToFile:@"/Users/henrik/Sites/foo.plist" atomically:NO]; I currently try to write to the f...

Getting Notifications of isDocumentEdited

Hello, is it possible to bind/get notifications of the isDocumentEdited property of NSDocument without calling the will/didChangeValueForKey: methods on every change? ...

Updating NSDocument status without undo?

I have a document-based application but I am not using undo. How do I change the status of my window to be 'dirty' and certain times? Thanks. ...

NSDocument vs sqlite records

I'm developing a cocoa application that could be used to manage customer and employee details in a small business. When I read through the NSDocument architecture, I believe that the document/window management and workflow it gives you is excellent, however I am trying to figure out how that architecture fits into (if at all) an appli...

Delaying Cocoa NSDocument creation at startup

I have a document-based Cocoa application that has to start up a sub-process before running. It would be best if that process could finish starting up before I display any document windows. I get a notification when the process has fully started. How can I delay the creation of the untitled NSDocument subclass object until the notific...

Recipe for making Cocoa NSDocument packages play well with svn?

I have a tool that writes package-style documents. It's implemented using NSDocument and overrides the following NSDocument methods: - (NSFileWrapper *)fileWrapperOfType:(NSString *)typeName error:(NSError **)outError; - (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSS...

Retieve the document name during Save operation of document based application

I have a document based application. I have overridden dataOfType function to save the appliation. However I am unable to retrieve the application name given by user in NSSavePanel while saving. Is there a way I can get the application name. Also which function is invoked after dataOfType is invoked which can be overridden ...

NSDocument get real save path?

Hey guys, I am trying to get the path that an NSDocument is being saved to at save time. I tried overriding writeToURL but that would pass me an obscure temp file URL, which was not where it was getting saved. Also asking the document like this [document fileURL] only works after it has been saved. I can get the path when it is loaded bu...

Binding to array controller in another nib for inspector window

Binding a popup menu to an array controller with the path selection.type works fine. Binding a popup menu to a document controller with the path currentDocument.arrayController.selection.type works one way only (changes in selection are not propagated to the popup menu). How can one achieve inspector-window-like functionality by bindi...

Allow bundles/plugins to add to Cocoa application's supported document extensions?

In a Document-based Cocoa application, handled file extensions are listed in the application's Info.plist file. The application I'm building will require a loadable bundle for each type of file it opens. As such, I'd like the presence of bundles to modify the way my application registers itself as handling certain file types. As an ex...