Why resizing doesn't work for me ?
Why resizing doesn't work for me ?
- Subject: Why resizing doesn't work for me ?
- From: kubernan <email@hidden>
- Date: Tue, 4 Dec 2001 10:20:29 +0100
Hello,
Because i had no response, i repost the same question : i don't find
solution.
If i display more than one instance of the same window and call a resize
function in my program,
the second window is resizing instead of the first one.
First window Second window third window
call resize
I ^
I I
I I
+--- applied here (!)------------+ <== wrong !!
Here's a part of my code :
------ Create.m ---------
- (id)init {
self = [super init];
if (![NSBundle loadNibNamed:@"CreateWindow" owner:self]) {
NSLog(@"Can't launch : CreateWindow.nib");
[self release];
}
}
- (void)awakeFromNib
{
[myParentWindow makeKeyAndOrderFront:self];
}
-(void)someStuff
{
// some code
if (count == 1)
[self modSize];
}
- (void)modSize
{
NSRect oldFrame = [myParentWindow frame];
NSRect
frame={{oldFrame.origin.x,oldFrame.origin.y-150},{oldFrame.size.width,oldFrame.
size.height+150}};
[myParentWindow setFrame:frame display:YES animate:YES];
}
- (NSWindow *)myParentWindow
{
return myParentWindow;
}