• 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: Correct use of NSViewController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct use of NSViewController


  • Subject: Re: Correct use of NSViewController
  • From: Jonathan Dann <email@hidden>
  • Date: Thu, 20 Mar 2008 01:19:58 +0000

Hi Cathy,

Thanks for the comprehensive answer to my question, I wanted to make sure that I wasn't committing heresy by going down the 'tree of view controllers' road before jumping in and refactoring all my code. I was hoping to set it up so I could forget about most of the memory management as I'm replacing views all over the place at runtime.

Out of interest, when I add my main split view, I then have to set its size to fit my document window's content view. As this task is view- related it seems like it the split view's NSViewController should handle the size calculation and placing of the view in the correct place in the window. I allocate and instantiate my view controller in my NSWindowController subclass, then set the split view as a subview of the content view and then in the -awakeFromNib of the view controller I get the split view's superview's (the content view's) frame, doing my resiing from there.

Would you do the same, as this seems to encapsulate the logic properly, or would you just set it all in the window controller?

Thanks again, you've been really helpful.

Jonathan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Correct use of NSViewController
      • From: Cathy Shive <email@hidden>
    • Re: Correct use of NSViewController
      • From: Cathy Shive <email@hidden>
References: 
 >Correct use of NSViewController (From: Jonathan Dann <email@hidden>)
 >Re: Correct use of NSViewController (From: Cathy Shive <email@hidden>)

  • Prev by Date: Re: Perform Selector After Delay Secondary Window
  • Next by Date: [SOLVED] Re: Where's the buffer overrun?
  • Previous by thread: Re: Correct use of NSViewController
  • Next by thread: Re: Correct use of NSViewController
  • Index(es):
    • Date
    • Thread