Re: Multithreaded NSView:setNeedsDisplay:
Re: Multithreaded NSView:setNeedsDisplay:
- Subject: Re: Multithreaded NSView:setNeedsDisplay:
- From: Scott Anguish <email@hidden>
- Date: Tue, 4 Dec 2007 03:30:00 -0500
[view performSelectorOnMainThread:@selector(redisplay)
withObject:YES waitUntilDone:NO];
But this is ugly. Is there a better way? Bummer that
setNeedsDisplay: is not threadsafe. Bummer that it requires an
argument at all...
I had answered this off-list, but just to reiterate
this is probably the best way to do this
[view performSelectorOnMainThread:@selector(redisplay) withObject:nil
waitUntilDone:NO];
and have the redisplay stub method as part of your view subclass.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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