• 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: Building an MVC based App for Mac OS X - NOT for iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building an MVC based App for Mac OS X - NOT for iOS


  • Subject: Re: Building an MVC based App for Mac OS X - NOT for iOS
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 27 May 2013 22:13:59 -0700

On May 27, 2013, at 8:34 PM, YT <email@hidden> wrote:

> SO what I am after is a ViewController.  I have a View placed in a Window where I use Quartz 2D to draw graphics into and need a Controller.  The Interface Builder was trying to force me to place ACTIONS AND OUTLETS in the Delegate files.
> I found that (as a nubee) very disconcerting and confidence shaking with regard to my experience with using an MVC.

It’s pretty common to have a window controller, and make it responsible for managing the views in the window too. (NSViewController wasn’t added until OS X 10.5 or so.)

You can use NSViewController if you want to be more modular, especially if you want to use the same view (or view hierarchy) in multiple windows, but it’s not any more or less MVC compliant. It’s just a difference in what granularity you make your controllers. Also, “controller” is really just a role in a design pattern; it doesn’t have to inherit from some system class with “Controller” in the name to be a valid controller.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Building an MVC based App for Mac OS X - NOT for iOS
      • From: YT <email@hidden>
References: 
 >Building an MVC based App for Mac OS X - NOT for iOS (From: YT <email@hidden>)
 >Re: Building an MVC based App for Mac OS X - NOT for iOS (From: Keary Suska <email@hidden>)
 >Re: Building an MVC based App for Mac OS X - NOT for iOS (From: Jens Alfke <email@hidden>)
 >Re: Building an MVC based App for Mac OS X - NOT for iOS (From: YT <email@hidden>)

  • Prev by Date: Re: Building an MVC based App for Mac OS X - NOT for iOS
  • Next by Date: Re: Building an MVC based App for Mac OS X - NOT for iOS
  • Previous by thread: Re: Building an MVC based App for Mac OS X - NOT for iOS
  • Next by thread: Re: Building an MVC based App for Mac OS X - NOT for iOS
  • Index(es):
    • Date
    • Thread