• 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: gif animation under a blocking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gif animation under a blocking


  • Subject: Re: gif animation under a blocking
  • From: "Koshiro MITSUYA" <email@hidden>
  • Date: Fri, 18 May 2007 17:33:40 +0900

Dear Andrew,

OK, I will try to write an asynchronous connection.
Thank you very much for you advice.

Koshiro


2007/5/18, Andrew Farmer <email@hidden>:
On 17 May 07, at 22:33, Koshiro MITSUYA wrote:
> I am trying to have a gif image animating during a HTTP session
> between a server.
> However, the animation stopped when I called NSURLConnection because
> (maybe) the connection is blocking the process.
>
> <... snip...>
>
> receivedData = [NSURLConnection sendSynchronousRequest:theRequest
> returningResponse:&response error:&error];

sendSynchronousRequest is a blocking operation - it doesn't return
until the remote server is done responding. As such, it'll block the
UI until it's done, preventing other things from happening (like the
image animating). Run it on a separate thread or set up an
asynchronous connection using connectionWithRequest:delegate: and an
appropriate delegate.

Get used to using delegates. They're a common Cocoa idiom that you'll
have to learn sooner or later.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >gif animation under a blocking (From: "Koshiro MITSUYA" <email@hidden>)
 >Re: gif animation under a blocking (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Mouse position from NSEvent starts at (0, 1) ?
  • Next by Date: Fill text in a circle path - NSVIEW
  • Previous by thread: Re: gif animation under a blocking
  • Next by thread: NSTableColumn binding problem
  • Index(es):
    • Date
    • Thread