Re: Odd error logged when coming back from 'Browse All Versions'
Re: Odd error logged when coming back from 'Browse All Versions'
- Subject: Re: Odd error logged when coming back from 'Browse All Versions'
- From: Quincey Morris <email@hidden>
- Date: Wed, 24 Aug 2011 19:03:43 -0700
On Aug 24, 2011, at 18:45 , Graham Cox wrote:
> On 25/08/2011, at 11:28 AM, Jerry Krinock wrote:
>
>> We have NSWindowWillEnterVersionBrowserNotification and NSWindowDidExitVersionBrowserNotification, however I found the former is not received if a document *opens* on the right side of the version browser, i.e. if the user "browses" to it. Maybe that doesn't matter in your case.
>
>
> Jerry, I'm now using these notifications on my main document to send further notifications to my app delegate which can save and restore my inspector states. I'm convinced this should be done by Cocoa, but as a workaround I can live with it.
This issue is mentioned in the "Versions" WWDC session video (around the 45:30 mark). Briefly, the suggested method is to use window delegate methods (typically implemented in the window controller) 'windowWill/DidEnter/ExitVersionBrowser' to hide/show palette windows as necessary.
As to why this isn't automatic, the answer is hinted at, earlier in the video. The versions browser doesn't know what parts of your user interface are necessary for interacting with the document window during version browsing. It could just as easily turn out that you *do* want a palette shown during browsing. It all depends on the function of the palette. Currently, it appears, palette windows are hidden by default on entry to the mode, and not restored on exit, and there's a hint that this behavior is not set in stone.
Adding two 1-line delegate methods in order to make your intentions explicit doesn't seem unnecessarily onerous. I *think* what you're actually discovering is that *after* taking a run at implementing various new 10.7 features, it's worthwhile to watch the videos again. At that point, you're going to be primed to absorb how to deal with the wiggly bits around the edges, which are to a great extent what the WWDC sessions are about.
_______________________________________________
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