• 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 08:54:14 -0700


On Sep 27, 2009, at 7:04 AM, jon wrote:

so far i can find the chain of windows, like this, but i can't figure out how to go deeper into them to be able to udpate the custom view down deep.... maybe i'm approaching it wrong too...

The best way to do this is to use NSNotification. Post a notification when the outline content changes, and have each object that manages one of the outline views (probably the NSDocument or NSWindowController subclass) observe that notification and update its outline view when it's received.


There are some times when you do need to tell every one of your windows something. The way I do this is to loop through the application's window list, then look at each visible window's delegate and check whether it's an instance of my window controller subclass; if so, I cast the pointer to that subclass and call a method on it. (Since you're using NSDocument, you could probably get the same effect by getting the list of open documents from the document-controller object.)

—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: redrawing a particular subview in non mainWindows.
      • From: jon <email@hidden>
References: 
 >redrawing a particular subview in non mainWindows. (From: jon <email@hidden>)

  • Prev by Date: Re: Getting glyphs for surrogate characters ??
  • Next by Date: Re: NSURLConnection upload to iDisk works with iPhone OS 2.x but fails on 3.x
  • 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