Re: NSDocument application: How do I maintain a single window?
Re: NSDocument application: How do I maintain a single window?
- Subject: Re: NSDocument application: How do I maintain a single window?
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 6 Jun 2004 13:58:16 -0700
On Jun 6, 2004, at 12:44 PM, Frederick C. Lee wrote:
I'm using the routine: <- (BOOL)loadDataRepresentation:(NSData *)data
ofType:(NSString *)type { > to read data from disk (a serialized
dictionary).
I don't need another window created. How can I maintain just the one
window and re-populate it vs creating another window with each use of
the loadDataRep... method?
Is there any particular reason for using the document architecture? It
sounds like you'll just be working against what it's intended for. It
would probably be easier to simply create a single-window application
and handle file opening directly.
If you really want to use the document architecture, you'll probably
need a subclass of NSDocumentController, and override
openDocumentWithContentsOfFile:display:
<
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSDocumentController.html#//
apple_ref/doc/uid/20000030/openDocumentWithContentsOfFile_display_>
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.