Re: threads and GUI
Re: threads and GUI
- Subject: Re: threads and GUI
- From: Markus Fritze <email@hidden>
- Date: Tue, 1 Sep 2009 12:55:52 +0200
NSAlert is not thread-safe. If it doesn't crash on your machine,
doesn't mean it works. You have to call CFUserNotificationDisplayAlert
() from a non-main thread to display an alert.
Markus
On Sep 1, 2009, at 12:08 PM, tahome izwah wrote:
Yes, it works fine as long as it's just a plain alert and not a sheet
etc. I've read on the web that AppKit calls should not be made on
threads other than the main thread but the Apple docs don't really
cover this (last time I checked anyway).
If you're not convinced you could display the dialog using a
-performSelectorOnMainThread call which would alleviate the problem
altogether.
This is Cocoa, not Carbon though (but you can mix them if you wish).
--th
2009/9/1 john smith <email@hidden>:
Thanks.
How about calling cocoa ui calls, like NSAlert, from the thread
then. Is
that doable? (while still running the "main gui" as carbon).
Thanks,
Michael Olsen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden