Re: Found a bug in Cocoa: where should I report it?
Re: Found a bug in Cocoa: where should I report it?
- Subject: Re: Found a bug in Cocoa: where should I report it?
- From: "Michael Ash" <email@hidden>
- Date: Sat, 22 Jul 2006 21:10:22 -0400
On 7/22/06, Matteo Manferdini <email@hidden> wrote:
(The bug is this: I have a wiew with a subview inside of it. The
subview has a scrollview inside, which has another view as a document
(I used here a simple emplty NSView for testing). Everything is done
via code and not in Interface builder (except for the top view that
is positioned inside the window there). When I scroll with the
scroller the content of the document view gets drawn incorrectly, the
content gets "stretched" and the blue color fron the scroller goes
inside of it. This is only a matter of sizes (I excluded all the code
from my custom views except the cose that manages the view
hierarchy), because if I reduce the top view by only one pixel,
everything works fine).
This generally happens when you have non-integral coordinates. Go
through and see if any of your view coordinates have non-integral
coordinates (check them in the window's coordinate space, if you're
doing any scaling or anything like that). When your views' boundaries
don't fall exactly on pixel boundaries it confuses the fancy pixel
copiers used for scrolling and things like this happen. Whether it's a
bug or not depends on your position, I suppose, but in any case it's
fairly well-known.
To fix it, you can make sure all of your coordinates are integral.
NSIntegralRect() can come in handy here. Or you can disable the
copying behavior by doing a setCopiesOnScroll:NO, this will cause the
entire contents to be redrawn when scrolled, which harms efficiency
but stops these sorts of artifacts.
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden