C Callback to update Cocoa UI elements - how?
C Callback to update Cocoa UI elements - how?
- Subject: C Callback to update Cocoa UI elements - how?
- From: ruffnex <email@hidden>
- Date: Fri, 10 May 2002 01:54:25 +0800
Hi,
I have a C library function which is asynchronous (kicks off a thread) and
accepts a C callback fn. The callback fn is invoked continuously, each
time receiving some status info.
I would like to display this dynamic status info in my GUI e.g. NSTextField.
My problem is what code to put in the C callback function to be able to
update the Cocoa UI controls.
Should I use an event mechanism to notify the main NSApplication thread e.
g. PostEvent: ? I believe that this should be MT-Safe. Does anybody have
experience at this and could highlight any caveats?
What other approaches can you think of? What's the best approach in terms
of ease of implementation? Are there complications due to the Obj-C
runtime?
Your feedback is appreciated - thank you.
Rgds,
Simon
_______________________________________________
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.