Re: Re: Window too large for Versions Browser
Re: Re: Window too large for Versions Browser
- Subject: Re: Re: Window too large for Versions Browser
- From: Half Activist <email@hidden>
- Date: Thu, 03 Oct 2013 09:12:20 +0200
Well, the minSize is actually correctly set but that doesn't seem to be small enough for Versions on small desktops, I found a solution by implemeting the NSWindowDelegate methods below to set the minSize to 640x480 when entering Versions, and setting it back to 1200x680 when exiting.
- (void)windowWillEnterVersionBrowser:(NSNotification *)notification
{
if( notification.object == self.mainWindow ){
self.mainWindow.minSize = NSMakeSize( 640, 480 );
}
}
- (void)windowWillExitVersionBrowser:(NSNotification *)notification
{
if( notification.object == self.mainWindow ){
self.mainWindow.minSize = NSMakeSize( 1200, 680 );
}
}
On Oct 2, 2013, at 7:56 PM, email@hidden wrote:
> On 2013 Oct 02, at 06:56, Half Activist <email@hidden> wrote:
>
>> 'NSInvalidArgumentException', reason: '*** -[NSDocumentRevisionsView layoutWithOriginalDocumentWindow:originalVisibleFrame:]: Window () cannot be used to browse versions because its minimum size ({1200, 701}) is too large.'
>
>> …I've tried to solve it by setting the minimum width to 800…
>
> The first thing you should do is to break on that exception (hopefully "All Objective-C Exceptions" will work), ask your window for its -minSize and -contentMinSize, and verify that your setting to 800 is being effective.
>
> Let us know if that does not lead to a solution.
_______________________________________________
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