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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to