Re: Cleaning up a window with blocks
Re: Cleaning up a window with blocks
- Subject: Re: Cleaning up a window with blocks
- From: Eric Gorr <email@hidden>
- Date: Thu, 29 Sep 2011 16:35:45 -0400
Ya, thanks.
I spotted that almost immediately after I posted the message.
On Sep 29, 2011, at 4:22 PM, Ken Thomases wrote:
> On Sep 29, 2011, at 11:42 AM, Thomas Davie wrote:
>
>> A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which, when the block is constructed, as not yet been assigned the result of addObserverForName:...
>
> You can fix that by declaring theObserver with the __block qualifier.
>
> Cheers,
> Ken
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden