• 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: NSURLConnection doesn't post
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection doesn't post


  • Subject: Re: NSURLConnection doesn't post
  • From: Micha Fuhrmann <email@hidden>
  • Date: Fri, 11 Apr 2008 10:46:27 +0200

Tom, thanks for your reply.

from my understanding in my case the Object that's initiated the NSURLConnection is my shared instance since the call comes from the outside through the - (IBAction)test:(id)sender that then initiates the NSURLConnection with sendLogs. So if an object calls "test", is NSURLConnection "owned" by this particular object? It doesn't make sense to me, the shared instance should be the only owner since the sendLogs is called be itself, although via "test" that indeed can be called from the outside.

I've also played around with NSThread and no go. Going to have to be creative here...

On 10 avr. 08, at 18:34, Tom Harrington wrote:

On Thu, Apr 10, 2008 at 6:27 AM, Micha Fuhrmann <email@hidden> wrote:
Now if I place a button on my interface and call test everything is fine,
the post is submitted and the delegate method is called. Suffice I call the
test method from another class and nothing gets posted (break points show me
the sendLogs method is indeed called), the didReceiveData method is not
called either. I've looked into adding the NSURLConnection into an array so
it wouldn't be scraped, created a separate send class just for the post etc.
to no avail, I really don't know what I'm doing wrong.

When you call -sendLogs from another class, does the run loop have the chance to run, or does the code block, or busy-wait, or something else that might prevent it from running? You'll need a working run loop for NSURLConnection to successfully post the data and call its delegate methods.

Also, is it possible that when -sendLogs is called from another class,
it's also called from a separate thread?  NSURLConnection's delegate
methods are called on the same thread that initiated the connection,
and if you've started a different thread, you have to create your own
run loop.

--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________

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

_______________________________________________

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


References: 
 >NSURLConnection doesn't post (From: Micha Fuhrmann <email@hidden>)
 >Re: NSURLConnection doesn't post (From: "Tom Harrington" <email@hidden>)

  • Prev by Date: Re: Making use of Core 2 features without 64bit addressing
  • Next by Date: Re: NSURLConnection doesn't post
  • Previous by thread: Re: NSURLConnection doesn't post
  • Next by thread: Re: NSURLConnection doesn't post
  • Index(es):
    • Date
    • Thread