• 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: Design Question - when to use NSPanel subclass vs. window controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Design Question - when to use NSPanel subclass vs. window controller?


  • Subject: Re: Design Question - when to use NSPanel subclass vs. window controller?
  • From: Oscar Morales Vivó <email@hidden>
  • Date: Mon, 12 May 2003 12:19:24 +0200

The short answer is that you should use a window controller whenever you don't have to jump through hoops to get the behavior you desire, which means you almost never should need to subclass NSPanel.

Hope that helps.


On Sunday, May 11, 2003, at 18:24 Europe/Madrid, Jim Correia wrote:

Looking at a class dump of AppKit reveals that there are several subclasses of NSPanel.

Obviously any conclusions I draw about the subclasses are going to be at least partially uninformed since I don't have the source. But looking at the instance variables and methods, it would appear that there is lots of controller like functionality baked into the NSPanel subclasses.

My question is this: When should I use a NSPanel subclass vs. using a window controller?

Thus far I use a window controller to deal with the controller aspects of things - outlets, actions, shuffling stuff between the view and the model, and have only subclasses NSPanel when I need to extend or alter the functionality of NSPanel.

This so far has seemed to be a reasonable way to do things, but I want to make sure I'm not missing something subtle or important about the MVC model. (Perhaps there is a reason, historical or other, for the class inheritance tree in AppKit?)

Thanks,
Jim
_______________________________________________
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.



/*
Oscar Morales Vivs

Eternal Computer Science Student. Master of C++ Templates. Cocoa Nut. Computer Graphics Illuminati. UI Guru in Training. Dabbler in all things CS and most which are not.

Web stuff: http://homepage.mac.com/oscarmv/index.html
*/
_______________________________________________
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: 
 >Design Question - when to use NSPanel subclass vs. window controller? (From: Jim Correia <email@hidden>)

  • Prev by Date: [ANNOUNCE] GeekTool 2.0
  • Next by Date: Long array sort and save
  • Previous by thread: Design Question - when to use NSPanel subclass vs. window controller?
  • Next by thread: Printing windows
  • Index(es):
    • Date
    • Thread