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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com