Re: Moving subviews to other window
Re: Moving subviews to other window
- Subject: Re: Moving subviews to other window
- From: Shawn Erickson <email@hidden>
- Date: Thu, 14 Dec 2006 10:33:25 -0800
On Dec 14, 2006, at 10:26 AM, Matt Neuburg wrote:
On Thu, 14 Dec 2006 11:29:12 +0100, Lorenzo <email@hidden> said:
Hi,
I have to move all the 4 views from a window to another window.
I use subviews: and addSubview: and it works pretty well.
The subviews array is sorted from the back to the front object, so
since I have to add the subviews in the same order, and cannot
remove the
first subview from the subviews array without causing troubles, I
use a
reverse array. Well, now the 4 views are in the new window, with
the proper
sort order, but one of the 4 views, containing other subviews,
shows its
subviews with a different sort order. Bad.
Subviews of the same view do not have a "sort order". If your
interface
relies upon layering two "siblings" (two subviews of the same view)
one on
top of the other, your interface is wrong. The only way an view should
appear in front of another view is if the one is a subview of the
other. m.
Actually siblings views do have a relative front to back ordering
(note -[NSView addSubview:positioned:relativeTo:]) however that
ordering isn't always correctly honored when drawing/invalidation
takes place in currently shipping version of Mac OS X.
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden