Re: Redrawing a superview from another view's -drawRect: method
Re: Redrawing a superview from another view's -drawRect: method
- Subject: Re: Redrawing a superview from another view's -drawRect: method
- From: Ricky Sharp <email@hidden>
- Date: Mon, 02 May 2005 09:17:46 -0500
On Monday, May 02, 2005, at 09:10AM, Nick Zitzmann <email@hidden> wrote:
>On May 2, 2005, at 7:55 AM, Ricky Sharp wrote:
>
>> In your case, it sounds like the other view is a sibling view? If
>> that's the case, why not do the right thing in your controller layer?
>
>It's not that easy. The sibling view creates an NSImageView with an
>image, removes a previous NSImageView if one exists, and adds the new
>view as a subview to one of the sibling view's superviews, all during
>draw time.
I think this is the ultimate problem then. I wouldn't be having your view do any view manipulation that would result in redraws from within drawRect (or other drawing methods).
It makes more sense to have your controller manage your views (i.e. adding, removing, etc.). Each view in turn can then be solely responsible for just drawing itself.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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