• 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: Dynamically loading a part of a Window in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically loading a part of a Window in Cocoa


  • Subject: Re: Dynamically loading a part of a Window in Cocoa
  • From: Keith Duncan <email@hidden>
  • Date: Wed, 01 Jul 2009 19:37:16 +0100

On 1 Jul 2009, at 18:26, Quincey Morris wrote:

Either you have to defeat the modularization by binding to File's Owner.windowController.whatever (File's Owner being the view controller subclass, of course, and windowController being a property you added to it)

This is how I do it, but I don't add a windowController property to each of the the view controllers. I instead add a parentController outlet typed as id; which allows the parent to be either a window controller or another view controller.


Then add a -windowController getter in an NSViewController category which walks the parentController chain and finds the top-level controller which -isKindOfClass:[NSWindowController class]

This retains the modularity of the view controllers and still provides simple access to the window controller's properties and document.

Keith
_______________________________________________

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


References: 
 >Dynamically loading a part of a Window in Cocoa (From: Debajit Adhikary <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Thomas Davie <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Quincey Morris <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Dynamically loading a part of a Window in Cocoa (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSLog / Console / Console Messages
  • Next by Date: A More User-Friendly FSResolveAlias/WithMountFlags()
  • Previous by thread: Re: Dynamically loading a part of a Window in Cocoa
  • Next by thread: Re: Dynamically loading a part of a Window in Cocoa
  • Index(es):
    • Date
    • Thread