Re: Controller layer & document architecture
Re: Controller layer & document architecture
- Subject: Re: Controller layer & document architecture
- From: Andreas Mayer <email@hidden>
- Date: Wed, 23 Jun 2004 18:15:53 +0200
Am 23.06.2004 um 17:25 schrieb Ken Tabb:
If I wanted to hook a controller to the info window and a model object
in the current document, do I have 1 controller per document or 1 per
app?
One per app.
Conversely if I have 1 controller per app, what's the best way to swap
the document to which it is synching info? Using the document
controller to get the frontmost document, or using notifications from
the document windows (eg. that the window just became / resigned
main)?
I think I'd assign [NSDocumentController sharedDocumentController] to
some global instance variable (of your app's delegate maybe) - let's
call it mainDocumentController - and bind to
mainDocumentController.currentDocument.
Andreas
_______________________________________________
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.