Re: When in Versions browser
Re: When in Versions browser
- Subject: Re: When in Versions browser
- From: Mike Abdullah <email@hidden>
- Date: Sat, 21 Jan 2012 13:43:28 +0000
On 21 Jan 2012, at 09:33, Martin Hewitson wrote:
> Dear list,
>
> I'm trying to get Versions and autosave working on my document app. Most things are working. I'm using the window delegate methods
>
> - (void)windowWillEnterVersionBrowser:(NSNotification *)notification;
> - (void)windowDidExitVersionBrowser:(NSNotification *)notification;
>
> to enable and disable some UI elements. I'm also setting a private ivar boolean _inVersionsBrowser to YES in
>
> - (void)windowDidEnterVersionBrowser:(NSNotification *)notification
>
> and to NO in
>
> - (void)windowDidExitVersionBrowser:(NSNotification *)notification
>
> Then in methods like -validateToolbarItem: I'm checking for this flag and returning NO if it's set to YES. This works for the current document window (all its toolbar items are disabled in the Versions browser) but not for the previous versions document windows. So, I need a more dynamic way to check if I'm in the Versions browser so that I can disable such things. Is there API to do that? I couldn't find it (obviously). Or is there a better way to do what I'm trying to do?
-[NSDocument isInViewingMode]
_______________________________________________
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