Note that there are some explanatory texts on larger screens.

plurals
  1. POASIHTTPRequest requestFinished not called
    primarykey
    data
    text
    <p>I'm writing a little static library (lib.a) for the iphone and I'm using ASIHTTPRequest to manage my data posting and etc.</p> <p>I have the main implementation (@implementation BlaBla) but in the main .m file, I have another (@interface Foo) and (@implementation Foo) for private methods.</p> <p>I've implemented the ASIHTTPRequestDelegate in the (@interface Foo) but the - (void)requestFinished:(ASIHTTPRequest *)request, but this method doesn't executing!</p> <p>No matter what I did, it doesn't work. I've added NSLog to log the requestFinished method, but it's not working.</p> <p>Example code:</p> <pre><code>@interface ActionsManager : NSObject &lt;ASIHTTPRequestDelegate&gt; + (void)blabla; @end @implementation ActionsManager + (void)blabla{ NSURL *requestUrl = [NSURL URLWithString:[NSString stringWithFormat:@"Bla.com/bla"]]; BlaRequest = [[[ASIFormDataRequest alloc] initWithURL:requestUrl]autorelease]; self = [BlaRequest delegate]; [BlaRequest setPostValue:blabla forKey:@"bla"]; [BlaRequest setRequestMethod:@"POST"]; [BlaRequest startAsynchronous]; } - (void)requestFinished:(ASIHTTPRequest *)request{ NSLog(@"request finished"); } - (void)requestStarted:(ASIHTTPRequest *)request{ NSLog(@"request started"); } @end @implementation MainImplementation - (id)init { self = [super init]; if (self) { } return self; } + (void)bbb{ [ActionsManager blabla]; } @end </code></pre> <p>I'll be very thankful for any help!</p> <p>BTW, can it be because of instance methods (-) or class methods (+)?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload