Re: NSTimer and modal panels
Re: NSTimer and modal panels
- Subject: Re: NSTimer and modal panels
- From: Ken Thomases <email@hidden>
- Date: Wed, 30 Sep 2009 07:03:05 -0500
On Sep 30, 2009, at 6:01 AM, Gabriel Zachmann wrote:
My question is: I've got a modal panel (a config sheet in a
screensaver) with a text field, and when I enter some text there one
of my methods, -changeSomething: say, gets called.
Is changeSomething executed in a different thread than my main code?
All GUI events and action methods are executed on the main thread.
You're being a bit paranoid regarding threads. Multi-threaded
programming is a mine field, so it's good to be wary about embarking
on that, yourself. However, exactly because it's so tricky, the Cocoa
frameworks are not going to just arbitrarily invoke your code on some
random thread. If the frameworks do something like that, you can be
assured there will be warnings about it in the relevant
documentation. Otherwise, frankly, none of us could make a move for
fear of stepping on a mine.
Cheers,
Ken
_______________________________________________
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