Another thing is that when moving or shrinking a view setNeedsDisplay needs to be called before and after the new frame is set otherwise the area of the old frame view won't be cleared.
Have this kind of code in your app is not so elegant.
[view setNeedsDisplay:YES];
view.frame = newFrame;
[view setNeedsDisplay:YES];
I propose that we move that into NSView. I made a dirty fix that may not be the optimal way to do it but it shows what I want to do with this proposal.
in NSView's - (void) setFrame: (NSRect)frameRect i added two calls to setNeedsDisplay like this:
if (changedSize == YES || changedOrigin == YES)
{
[self setNeedsDisplay:YES];
[self _setFrameAndClearAutoresizingError: frameRect];
[self setNeedsDisplay:YES];
......
What do you guys think?
--
Johannes Lundberg
BRILLIANTSERVICE CO., LTD.