Updating UI objects from another thread
Updating UI objects from another thread
- Subject: Updating UI objects from another thread
- From: Luke Bellandi <email@hidden>
- Date: Thu, 21 Feb 2002 11:40:06 -0800
What's the best way to update an AppKit object (specifically a text field)
from another thread? Say I have a clock I'm running in an NSThread, and all
the NSThread does is
int i = 0;
while (true) {
[timeField setIntValue: ++i];
usleep (50000);
}
So I would think this should update that field at 20Hz (which it does), but
the text rendering is sloppy: lots of overwrites and such. How can I update
a text field correctly outside the main application thread?
Thanks for the help!
Luke Bellandi
CoreAudio
Apple Computer
_______________________________________________
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.