Re: When do documents position windows?
Re: When do documents position windows?
- Subject: Re: When do documents position windows?
- From: Donald Brown <email@hidden>
- Date: Thu, 06 Jun 2002 12:27:59 -0500
I came up with a workaround that's a bit of a kludge, I created a subclass
of NSWindow called NoCascadeWindow, with one function:
- (NSPoint)cascadeTopLeftFromPoint:(NSPoint)topLeftPoint
{
NSString* sStr = [self frameAutosaveName];
if ((sStr!=nil)&&([sStr length]>0))
return topLeftPoint;
else
return [super cascadeTopLeftFromPoint:topLeftPoint];
}
Opening a new window over an existing window won't position properly, but
opening multiple new windows will.
Donald
on 6/6/02 12:01 PM, Marco Scheurer at email@hidden wrote:
>
The problem is that in the case of document windows (i.e. you are using
>
NSDocument/NSDocumentController) while the window size is set, the
>
position is ignored. More exactly, it must be reset by a
>
cascadeTopLeftFromPoint message sent to the window after your
>
setFrameUsingName. You could imagine sending setFrameUsingName after a
>
delay, but then you will probably loose the cascading effect.
>
>
I gave up on this, and hope Apple will fix this behavior. I have yet to
>
see a multiple-document app that remembers the last window's position.
--
Donald Brown
email@hidden
http://www.eamontales.com
We have met the enemy and he is us - Pogo
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.