On Jan 14, 2010, at 11:59 AM, Nick Zitzmann wrote: > On Jan 14, 2010, at 12:30 PM, Jamie Hardt wrote: > >> How does one support -cancel in an NSBlockOperation? Testing [NSThread >> isCancelled] doesn't appear to work. > > The same way you do it with NSInvocationOperations - pass in the operation as > an argument to the block and check the object's cancellation state using that > argument.
The block that NSBlockOperation takes is (void)^(void), do you mean I have to declare it outside of the block scope and let the block copy the reference when it invokes? Jamie_______________________________________________ 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