Re: drawing NOW in a callback, boom!
Re: drawing NOW in a callback, boom!
- Subject: Re: drawing NOW in a callback, boom!
- From: John Hörnkvist <email@hidden>
- Date: Sat, 8 Jun 2002 07:47:44 +0200
On Wednesday, June 5, 2002, at 12:17 AM, Paul Cezanne wrote:
I'm redrawing a view from a callback in a thread and crashing. I'm not
sure why I'm crashing. Let me set up the situation for you with some
code snippets.
Have you set up an additional drawing context? When starting threads
that do drawing, you're supposed to call NSApplication's +
(void)detachDrawingThread:(SEL)selector toTarget:(id)target
withObject:(id)arg
ument to get all the state set up for you.
If you don't do that, multiple threads will be sending commands to the
same drawing context, causing all kinds of weird problems.
You can probably set up a context manually, but I have never tried that
myself.
Regards,
John Hornkvist
_______________________________________________
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.