• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie questions


  • Subject: Re: Newbie questions
  • From: Mike Ferris <email@hidden>
  • Date: Mon, 23 Dec 2002 10:27:05 -0800

Read the Application Architecture Programming Topic in the Cocoa docs. This goes into some detail on the document stuff and MVC.

Upshot is that both NSDocument and NSWindowController are "controller" objects primarily. But NSDocument's focus is on the model (it's a "model-controller") and NSWindowController's focus is on the view (it's a view-controller).

It sounds like you ought to be moving towards migrating view-controller logic from your document class to a custom NSWindowController rather than trying to move the model-control stuff elsewhere. (And there is a [window windowController] method, too...)

Mike


Begin forwarded message:

From: Ted Lowery <email@hidden>
Date: Mon Dec 23, 2002 7:41:24 AM US/Pacific
To: email@hidden
Subject: Newbie questions

Hi all-

This seems a little confusing to me. In the MVC paradigm of cocoa development, should I consider "myDocument" for a doc-based application to be the model or the controller for my nib? I've been thinking it was the model, since it knows how to load and save the data for the document, but as I add more functionality, there's no clear way to access the controller from outside the nib, however I can access the [window document] which makes me think myDocument is the controller. If that's the case, I guess I should refactor the data loading behavior to another object, that myDocument (as a controller) knows how to access.

Am I on the right path, or still confused?

Thanks for all the help.

Cheers, Ted
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Newbie questions (From: Ted Lowery <email@hidden>)

  • Prev by Date: Re: how to make version info appear in Finder?
  • Next by Date: Re: Preferences Dialogs
  • Previous by thread: Re: Newbie questions
  • Next by thread: Preferences Dialogs
  • Index(es):
    • Date
    • Thread