• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: drawing NOW in a callback, boom!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >drawing NOW in a callback, boom! (From: Paul Cezanne <email@hidden>)

  • Prev by Date: Re: NSConnection, where'd my proxy go?
  • Next by Date: Re: DnD for NSTextFields, Drag'n'Drop
  • Previous by thread: Re: drawing NOW in a callback, boom!
  • Next by thread: copyWithZone: -- selector not recognized
  • Index(es):
    • Date
    • Thread