Re: window expands on second run, but can be contracted to the size in IB
Re: window expands on second run, but can be contracted to the size in IB
- Subject: Re: window expands on second run, but can be contracted to the size in IB
- From: Michael Hanna <email@hidden>
- Date: Tue, 19 Oct 2004 12:23:38 -0400
A follow-up, if I set the breakpoint to
drawerRect = [drawerView frame];
{w,h}=339,200 whereas in IB I set the drawer w,h to 339,133. The
parent window's height is 179. It was suggested that the drawer is
expanding to the parent window, but why 200? Also, the parent window
expands to a height of 257!
any ideas?
Michael
On 19-Oct-04, at 11:14 AM, Michael Hanna wrote:
I noticed that after running the app a second time, the main window is
wider and taller than last opened .. I think this has something to do
with the nib file and the dimensions it writes-out to the .plist file.
any suggestions how to solve it
if I make aSize = drawerRect.size; the drawer becomes incredibly tall.
The window is not as tall as the drawer, but once you expand the
window, it won't return to its original small size.. weird. so that is
why I have to do aSize = NSMakeSize(339,133); which matches the
dimensions in IB. the window can be contracted to a smaller size
again, but once I quit and run the app again, it's larger
again(however the nsdrawer is small).
awakeFromNib:
NSRect drawerRect;
NSSize aSize;
NSView *drawerView = [bottDrawer contentView];
drawerRect = [drawerView frame];
//aSize = [[drawerView superview] bounds].size;
aSize = [bottDrawer contentSize];
//aSize = drawerRect.size;
NSLog(@"drawerview size awake: %f, %f", aSize.height,
aSize.width);
aSize = NSMakeSize(339,133);
[self setupBottomDrawer:aSize];
[self setBottomDrawerOffsets];
- (void)setupBottomDrawer:(NSSize)theSize {
[bottDrawer setContentSize:theSize];
[bottDrawer setMaxContentSize:theSize];
[bottDrawer setMinContentSize:theSize];
} _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden