On Mon, Feb 2, 2009 at 11:03 AM, Scott Ribe <scott_r...@killerbytes.com> wrote: >> It has long been my understanding that in order to keep a GUI from >> freezing in Cocoa during LONG methods you have to create a >> NSOperationQueue and load the method as a NSInvocationOperation as seen > > No, you have to run the long operations on another thread. NSOperationQueue > is supposed to provide an easy way to do that, but it's not necessary. You > can start a thread and arrange to receive its results using NSThread, or > MPTasks, or pthreads...
Or you can spawn another process and talk to it asynchronously. Or you can break your LONG method up into a bunch of SHORT operations, which you then call from a timer. The only thing you HAVE to do to keep the GUI responsive is not block the event loop for a noticeable amount of time. How you actually do that is entirely up to you. NSOperation is just one of many options. Mike _______________________________________________ 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 arch...@mail-archive.com