> I had a chicken and egg problem wrt initializing the handler (with a 
> completion block that needed the connection) and the connection (which needed 
> the handler).

In that circumstance you can decorate the variable that you need to reference 
inside the block as __block, and set it to nil. These variables aren't const 
copied, they are moved to the heap and referenced. When you assign to it in 
future lines, the block will reference the updated value.

Keith

_______________________________________________

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