Re: Adding/removing rectangles from an NSImageView
Re: Adding/removing rectangles from an NSImageView
- Subject: Re: Adding/removing rectangles from an NSImageView
- From: James Chen <email@hidden>
- Date: Thu, 12 Feb 2004 09:49:13 +0800
Hi,
These are something might help.
On Feb 12, 2004, at 4:55 AM, Rob In der Maur wrote:
Relevant code from the -endPageViewSheet:
for (i = 0; i < [[pageViewImageView subviews] count]; i++) {
RectangleView *rectView = [[pageViewImageView subviews]
objectAtIndex:i];
[rectView removeFromSuperviewWithoutNeedingDisplay];
// tried [rectView removeFromSuperView] without effect
[pageViewImageView setNeedsDisplayInRect:[rectView bounds]];
line above changed to ==> [pageViewImageView
setNeedsDisplayInRect:[rectView frame]];
Because the parameter rectangle should be in pageViewImageView's
coordinate.
}
If this doesn't work, I guess the sheet didn't get a chance to redraw
itself before you close it.
So maybe you should force the sheet to draw by sending -display to
pageViewImageView before you close it.
Hope these help,
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
_______________________________________________
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.