views:

38

answers:

1

When i try to send – initWithRequest:delegate:startImmediately: message to NSURLConnection from a class method, passing an ad-hoc delegate object, delegate methods never gets called. When, instead, – initWithRequest:delegate:startImmediately: is sent by an object, and the delegate of NSURLConnection is self, than all goes OK. Someone can explain me why? i stucked here for three days or so ^^'

+1  A: 

There's no difference. If your delegate methods aren't getting called it is because your implementation is obviously incorrect. The target delegate must be in the same runloop, and if you're releasing autoreleased objects or something like that, your implementation is wrong.

Post your code or recheck your work.

Jordan
when NSURLConnection is used by the static method, the control returns to the calling method, without any delegate method being called (checked with breakpoints too).nothing is autoreleased nor released, given that NSURLConnection is instantiated using initWithRequest:delegate:startImmediately:the app is not multithreaded.
mndhkr