Re: Cleaning up a window with blocks
Re: Cleaning up a window with blocks
- Subject: Re: Cleaning up a window with blocks
- From: Ken Thomases <email@hidden>
- Date: Thu, 29 Sep 2011 15:22:12 -0500
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