Re: NSDocumentController singleton problem, part 2
Re: NSDocumentController singleton problem, part 2
- Subject: Re: NSDocumentController singleton problem, part 2
- From: matt neuburg <email@hidden>
- Date: Wed, 18 Dec 2002 09:49:46 -0800
On Tue, 17 Dec 2002 15:58:12 -0600, Brad Oliver <email@hidden> said:
>
>
On 12/17/02 12:01 PM, "matt neuburg" <email@hidden> wrote:
>
>
> If you can only have one document open at a time you're not really doing
>
> documents, so what do you need it for?
>
>
side, it made use of the MFC single-document template. The hooks for marking
>
the document as edited, as well as the hooks for loading, saving and
>
prompting to save are all very nice and saved me quite a bit of coding (with
>
the caveat that they don't yet work for me as-is).
But you don't need the document architecture to get those, as TextEdit proves. In fact, if you get rid of the document architecture you contact those things much more directly - you get the delegate messages and you get to decide what to do with them, etc. And as you've discovered, if you use the document architecture, it does some stuff automatically for you - and in your case, that's bad, because you're trying to use it in a way it wasn't intended to be used.
I strongly repeat my recommendation that you look at the Anguish et. al. book, which provides a complete implementation of an app that opens and saves documents without any use of the document architecture.
My app uses singleton pseudo-documents and this is done entirely by just having some singleton NSWindowController subclasses. I make no use of NSDocument etc. m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.