window expands on second run, but can be contracted to the size in IB
window expands on second run, but can be contracted to the size in IB
- Subject: window expands on second run, but can be contracted to the size in IB
- From: Michael Hanna <email@hidden>
- Date: Tue, 19 Oct 2004 11:14:43 -0400
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:
This email sent to email@hidden