This should be easy.  What am I doing wrong here?

• Window height is 692, content min height is 363 and min height is 431.
• I set the min height to 646.
• Read it back, using -minSize.

Expected result:  Because I tried to *increase* the *minimum* height, and to a 
value less than the current height, there should be no conflicts.  It should 
obey me.

Actual result:  Instead of increasing from 431 to 646, min height increased 
more, to 692, the current height of the window.  Why?

Coincidentally, I'm setting the min width to the current width.  That works as 
expected.

Thanks to anyone who can make my day.

Jerry Krinock


* CODE *

NSLog(@"   styleMask = 0x%lx  resizable = %hhd",
          (long)[window styleMask],
          (BOOL)(([window styleMask] | NSResizableWindowMask) > 0)) ;

NSLog(@"1    current = %@", NSStringFromSize([window frame].size)) ;
NSLog(@"1 contentMin = %@", NSStringFromSize([window contentMinSize])) ;
NSLog(@"1        min = %@", NSStringFromSize([window minSize])) ;

NSLog(@"Setting min to %@", NSStringFromSize(windowMinSize)) ;
[window setMinSize:windowMinSize] ;

NSLog(@"2    current = %@", NSStringFromSize([window frame].size)) ;
NSLog(@"2 contentMin = %@", NSStringFromSize([window contentMinSize])) ;
NSLog(@"2        min = %@", NSStringFromSize([window minSize])) ;


* CONSOLE OUTPUT *

styleMask = 0xf  resizable = 1
1    current = {580, 692}
1 contentMin = {520, 363}
1        min = {520, 431}
Setting min to {580, 646}
2    current = {580, 692}
2 contentMin = {580, 624}
2        min = {580, 692}

The reason for the rather large differences, 68, between the min height and 
content min height, is because this window has a toolbar in addition to a title 
bar.


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to