Re: Changing order of views dynamically
Re: Changing order of views dynamically
- Subject: Re: Changing order of views dynamically
- From: Michael Watson <email@hidden>
- Date: Tue, 20 Mar 2007 07:07:27 -0400
I'd just like to say that this is a really succinct example of a bug
that could be difficult to track down. Precisely why you listen to
the API documentation! :-)
--
m-s
On 20 Mar, 2007, at 06:29, Andreas Mayer wrote:
(1) OK, I'll make up a scenario in which your app might break:
Note that I'm *not* saying this is how thing work; they *might*
work this way. Or they might not. We just don't know.
1. Assume that all subviews are ordered from left to right, lowest
to topmost.
2. Assume view A < view B, i.e. B should be on top of A.
3. Assume view A.x+A.width > B.x, i.e. view B overlaps the
rightmost part of A.
4. Assume the control has to redraw a rectangle, X.
5. Assume X.x >= A.x, A.x < X.x+X.width < A.x+A.width, X.x+X.width
> B.x.
6. Now the superview might intersect each subviews rectangle with
the rectangle that is to be redrawn, find that A covers X
completely and therefore, as an optimization, stops the redraw loop
after drawing A.
==> You have a redraw problem.
_______________________________________________
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