• 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 from secondary thread erases resize corner in window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing from secondary thread erases resize corner in window?


  • Subject: Re: Drawing from secondary thread erases resize corner in window?
  • From: Chris Suter <email@hidden>
  • Date: Thu, 28 Feb 2008 12:30:23 +1100


On 28/02/2008, at 10:54 AM, Kyle Sluder wrote:

On Wed, Feb 27, 2008 at 2:40 PM, Hank Heijink <email@hidden> wrote:
I have a window with a custom view that occupies the entire window, so
the little resize corner in the lower right is within the bounds of
the view. I noticed that when I draw into the window from the main
thread (i.e. the usual way) that resize corner is redrawn when the
view is redrawn. However, when I update the view from another thread,
that doesn't happen. What am I missing?

Do not use AppKit from any thread other than your main thread. It is not thread-safe.

This is incorrect. You can use AppKit from other threads; you just need to be careful. There's nothing wrong with what the OP was doing. See


<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/AddingBehaviortoaCocoaProgram/chapter_4_section_6.html#//apple_ref/doc/uid/TP40002974-CH5-DontLinkElementID_16 >

I suspect the problem with the resize corner is because it's drawn by the framework and the code that draws in the background is overwriting it. I'm not sure how you solve that.

- Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Drawing from secondary thread erases resize corner in window?
      • From: "Hamish Allan" <email@hidden>
References: 
 >Drawing from secondary thread erases resize corner in window? (From: Hank Heijink <email@hidden>)
 >Re: Drawing from secondary thread erases resize corner in window? (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Charting API? (Chris Schmitt)
  • Next by Date: Re: Table views with different NSArrayControllers sharing the same data object...
  • Previous by thread: Re: Drawing from secondary thread erases resize corner in window?
  • Next by thread: Re: Drawing from secondary thread erases resize corner in window?
  • Index(es):
    • Date
    • Thread