Re: Rapid use of NSTextField
Re: Rapid use of NSTextField
- Subject: Re: Rapid use of NSTextField
- From: "M. Uli Kusterer" <email@hidden>
- Date: Mon, 19 Apr 2004 17:02:43 +0200
At 14:49 Uhr -0500 18.04.2004, Justin Bakse wrote:
Are there any special precautions i should be using working with
NSTextfields (or controls in general) in a threaded app? Any thing
else come to mind?
Yes. GUI stuff should only be done from the main thread in Cocoa.
Most of it is not really thread-safe yet.
If you're calling GUI stuff from a separate thread, you'll have to
use performSelectorOnMainThread: or similar calls to make things work.
It has *nothing* to do with how frequently you make your calls. And
while I'm at it: Why are you changing the first responder that often?
Changing its value doesn't require changing the First Responder. And
if *you* change it, the user won't be able to type anything because
the characters will end up wildly distributed around the various
fields. What are you trying to achieve?
It really sounds like you are trying to do something very different,
and doing it the wrong way round. What exactly are you trying to
achieve? What "user-level" task are you trying to accomplish?
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.