Re: Calling NSBeginAlertSheet() from outside the main thread messes up animation
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.