It sounds like you want an NSOperationQueue, which would map to your problem on a high level.

http://developer.apple.com/documentation/Cocoa/Reference/NSOperationQueue_class/Reference/Reference.html

I don't know Win32, but PostMessage() sounds a lot like NSNotificationCenter's postNotificationName:object:. You could do this to roll your own process list-thing using this and posting messages to your main NSRunLoop asynchronously, but you'd probably end up with something that looks a lot like NSOperationQueue.

On Oct 8, 2008, at 7:46 PM, John Zorko wrote:


Hello, all ...

If a certain flag is set, my app needs to advance to the next item in a list to process it when the previous item is done. However, I want the user to still be able to stop it, so I don't want to hang the UI. In effect, if this flag is set, I want the app to act as if the user had manually selected the next item to process.

In Win32, one way I could do this is by using PostMessage() -- when the current item is finished processing, it would post a message to the relevant threads' message queue and it would get processed, just as if the message was put there as a result of a GUI action. How do I do this in Cocoa, or is there a better way?

Jamie Hardt
The Sound Department
http://www.soundepartment.com/
http://www.imdb.com/name/nm0362504/

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to