• 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: Calling NSBeginAlertSheet() from outside the main thread messes up animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling NSBeginAlertSheet() from outside the main thread messes up animation


  • Subject: Re: Calling NSBeginAlertSheet() from outside the main thread messes up animation
  • From: Dustin Voss <email@hidden>
  • Date: Mon, 24 Nov 2003 16:40:47 -0800

On 24 Nov, 2003, at 2:54 PM, Daniel Aarno wrote:

Hi, I want to use NSBeginAlertSheet() to display an alert in a window. The error is detected in a different thread than the main thread, and although NSBeginAlertSheet() works and produces the alert sheet the drawing is messed up.

What happens is that as the sheet animates it is transparent (outlined) or transparent green. If I invoke NSBeginAlertSheet() from the main thread no such problems occur. Everything else works as expected, only the animation is messed up. Anyone have any insight on this (cause and or solution)?

Two suggestions:
1) Write a separate method that displays the error dialog, and call that method on the main thread (using performSelectorOnMainThread).
2) Create an NSAlert object and set it up in your worker thread, but use performSelectorOnMainThread to actually start it going.
_______________________________________________
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: 
 >Calling NSBeginAlertSheet() from outside the main thread messes up animation (From: Daniel Aarno <email@hidden>)

  • Prev by Date: Re: cocoa-java
  • Next by Date: NSSize not found in XCode
  • Previous by thread: Re: Calling NSBeginAlertSheet() from outside the main thread messes up animation
  • Next by thread: Menu itemhighlighting flakey in panther
  • Index(es):
    • Date
    • Thread