• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cleaning up a window with blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Cleaning up a window with blocks
      • From: Eric Gorr <email@hidden>
References: 
 >Cleaning up a window with blocks (From: Eric Gorr <email@hidden>)
 >Re: Cleaning up a window with blocks (From: Thomas Davie <email@hidden>)

  • Prev by Date: Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)
  • Next by Date: Re: Cleaning up a window with blocks
  • Previous by thread: Re: Cleaning up a window with blocks
  • Next by thread: Re: Cleaning up a window with blocks
  • Index(es):
    • Date
    • Thread