Re: Child and Parent windows have dysfunctional relationship?
Re: Child and Parent windows have dysfunctional relationship?
- Subject: Re: Child and Parent windows have dysfunctional relationship?
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 14 Jul 2004 16:48:46 +0100
On 14 Jul 2004, at 1:28 pm, Andreas Mayer wrote:
Am 14.07.2004 um 11:09 Uhr schrieb Jeremy Dronfield:
I note from the documentation that child window behaviour in relation
to the parent is meant to be similar to drawer behaviour. Since
drawers do resize with their parent window, is this a bug in parent
window/child window attachment, or simply behaviour not yet
implemented?
I don't think it's meant to resize automatically.
Actually, I expressed that badly. In the particular case I have, the
child window isn't meant to resize; it's just meant to stay in the same
position relative to the parent window. The child window is located
near the bottom right of the parent. When the parent resizes,
therefore, the child stays in the same place (in screen coordinates),
giving the visual impression of becoming "detached" from the parent.
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSWindow.html
"childWin is ordered either above (NSWindowAbove) or below
(NSWindowBelow) the receiver, and maintained in that relative place
for subsequent ordering operations involving either window. While this
attachment is active, [...] moving the receiver will cause childWin to
move.
I can't find anything about resizing here. Is there some other
documentation?
No, there isn't (at least not that I'm aware of). I take this document
as implying that parent/child behaviour is similar to parent/drawer
behaviour. Since a drawer remains firmly attached to its parent, I
think a child should do so also. (Or at least should have the option of
doing so - e.g. -[NSWindow setFollowsParentWhenResizing:] or
something.)
My opinion is that the situation I describe above gives conflicting
impressions to the user. - i.e., Is this little window attached to the
big window or not? I move the big window around, and the little window
stays glued right to it, but I resize the big window and hey! - what
happened? The little window got left behind!
As I said before, it's easy enough to make a child window follow resize
actions in the parent, but since it seems to me that this shouldn't be
necessary, I wonder whether this is a bug or a design oversight, or
indeed a deliberate limitation. Since the documentation is so thin on
this point (the passage you quote is the only mention I can find of how
child windows are meant to behave), it's difficult to be sure what is
intended. No, it doesn't mention resizing - either for against.
Regards,
-Jeremy
_______________________________________________
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.