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 PROTECTED]> 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 PROTECTED]
AIM: atomicbird1
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/michaf%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to