On Dec 22, 2009, at 11:19 AM, PCWiz wrote:

> Is there any easy way to execute a portion of code on the main thread without 
> going through the mess of delegates and selectors?


Delegates have *nothing* to do with main thread execution.   Selectors a bit 
orthogonal, too.

If you want to execute something on the main thread, I would suggest using 
NSOperationQueue's notion of main queue and enqueuing an operation with a block:

- (void)addOperationWithBlock:(void (^)(void))block

Quite straightforward.

b.bum
_______________________________________________

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

Reply via email to