Re: My alert sheet looses focus in second thread
Re: My alert sheet looses focus in second thread
- Subject: Re: My alert sheet looses focus in second thread
- From: j o a r <email@hidden>
- Date: Thu, 6 Jan 2005 13:19:41 +0100
On 2005-01-06, at 13.12, Peter Karlsson wrote:
How do I set focus to my alert sheet? It's opened in my second thread
like
this:
NSBeginAlertSheet(@"I have a message for you", @"Close", nil, nil,
myWindowOutlet, self, nil, nil, nil, blah);
...and I think the second thread is the reason it looses the focus.
Read and grok:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
Multithreading/Concepts/safety.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/
Multithreading/Tasks/appkit.html>
<http://www.cocoadev.com/index.pl?ThreadSafety>
Never expect to be allowed to do anything in a non-main thread if it's
not explicitly stated that what you attempt to do is thread safe.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden