Sent from my iPhone
> On 2013/12/07, at 0:27, Graham Cox <graham....@bigpond.com> wrote: > > >> On 6 Dec 2013, at 11:26 am, Graham Cox <graham....@bigpond.com> wrote: >> >> NSBlockOperation* op = [NSBlockOperation >> blockOperationWithBlock:^ >> { >> CGContextClipToRect( ncx, tileRect ); >> >> [self drawTile:tileRect inContext:ncx]; >> }]; > > > A question for blocks experts: > > Is the value of <tileRect> here captured when the block is created,or when it > is run? > > If the latter, it’s going to be probably wrong most of the time, so how can I > make sure it is captured when the block is created? > > ―Graham > > > _________________ It's the latter IIRC You'll want to capture it outside and prefix it to be block scoped. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com