• 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: redrawing a particular subview in non mainWindows.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: redrawing a particular subview in non mainWindows.


  • Subject: Re: redrawing a particular subview in non mainWindows.
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 27 Sep 2009 14:13:05 -0700


On Sep 27, 2009, at 11:19 AM, jon wrote:

the question it appears to me is: that this "treeController" also is made into multiple instances with each new Document, is there an already defined "loop" of these? (a list of the open document's NSTreeController *treeController;)

No. I think you're confused about now nibs work. In your example, 'treeController' is an instance variable (or field) of your document class. That means every instance of the class has one.


What happen when creating a document is that the NSDocumentController creates a new instance of your document subclass, then loads a new copy of the nib with your document object as its 'owner'. This creates a new instance of every object contained in the nib; and the instance variables of the owner object (your document) get connected to those new objects as you specified. So in your new document object, the treeController instance variable will point to the new tree controller.

So every open document has one tree controller. If you want to find the list of open documents, ask the NSDocumentController.

—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


References: 
 >redrawing a particular subview in non mainWindows. (From: jon <email@hidden>)
 >Re: redrawing a particular subview in non mainWindows. (From: Jens Alfke <email@hidden>)
 >Re: redrawing a particular subview in non mainWindows. (From: jon <email@hidden>)

  • Prev by Date: Re: Best Design Advice
  • Next by Date: Re: Best Design Advice
  • Previous by thread: Re: redrawing a particular subview in non mainWindows.
  • Next by thread: Re: redrawing a particular subview in non mainWindows.
  • Index(es):
    • Date
    • Thread