• 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: [NSSound isPlaying] fails to indicate sound termination in Lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSSound isPlaying] fails to indicate sound termination in Lion


  • Subject: Re: [NSSound isPlaying] fails to indicate sound termination in Lion
  • From: Gavin Stokes <email@hidden>
  • Date: Sun, 22 Jul 2012 23:45:42 -0700

>
> Asynchronous programming means you'll be called back when things happen,
> and in the meantime you should return control so other stuff can run. It
> doesn't mean that you should go into an infinite loop trying to force
> something async to run synchronously.
>

That question was rhetorical.  The point is that, for a newcomer to this
kind of programming, it can be perplexing to figure out what the "other
stuff" is that can run, when in fact the entire state of the application
may be invalid until some asynchronous process returns a result.

For example, I have an app that literally will not function unless it can
make a network connection; it is useless without one.  But I don't freeze
the whole thing waiting for a response; I display a status message.

iCloud is another good example, since you really have no idea what it's
doing or if it will ever get back to you.  Apple says it's a good place to
store things like what page of an article your user was reading on another
device, so he can start right there on a different device.  But you have no
idea when or if that key/value pair will be returned from iCloud, so your
application must do something in the meantime at startup.

It seems obvious after you've dealt with this a while, but at first it's a
hurdle.
_______________________________________________

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: [NSSound isPlaying] fails to indicate sound termination in Lion
      • From: Jay Reynolds Freeman <email@hidden>
References: 
 >[NSSound isPlaying] fails to indicate sound termination in Lion (From: Jay Reynolds Freeman <email@hidden>)
 >Re: [NSSound isPlaying] fails to indicate sound termination in Lion (From: Fritz Anderson <email@hidden>)
 >Re: [NSSound isPlaying] fails to indicate sound termination in Lion (From: Jay Reynolds Freeman <email@hidden>)
 >Re: [NSSound isPlaying] fails to indicate sound termination in Lion (From: Ken Thomases <email@hidden>)
 >Re: [NSSound isPlaying] fails to indicate sound termination in Lion (From: Jay Reynolds Freeman <email@hidden>)
 >Re: [NSSound isPlaying] fails to indicate sound termination in Lion (From: Gavin Stokes <email@hidden>)

  • Prev by Date: Re: Profound UITableView rendering-performance problem, but only at certain positions?
  • Next by Date: Re: [NSSound isPlaying] fails to indicate sound termination in Lion
  • Previous by thread: Re: [NSSound isPlaying] fails to indicate sound termination in Lion
  • Next by thread: Re: [NSSound isPlaying] fails to indicate sound termination in Lion
  • Index(es):
    • Date
    • Thread