Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you set <code>setSuspended</code> to <code>YES</code> before adding the Operations then your Operations will be queued into a suspended queue.. i suggest not to suspend the queue at </p> <p>furthermore, your operation never ends anyway. You need to assign the operation itself as the delegate and implement all necessary delegate methods. In these methods you can forward the messages to your <code>parentDelegate</code> and decide when you are finished and call your done method when appropriate (i suggest <code>connection:didFailWithError:</code> and <code>connectionDidFinishLoading:</code>)</p> <p>There is a good tutorial here: <a href="http://blog.9mmedia.com/?p=549" rel="nofollow noreferrer">http://blog.9mmedia.com/?p=549</a></p> <p>You are also not completely implementing key-value-coding compilant properties correct. Whenever you call <code>willChangeValueForKey:</code> you also need to call <code>didChangeValueForKey</code> afterwards:</p> <pre><code>- (void)start { ... [self willChangeValueForKey:@"isExecuting"]; executing = YES; [self didChangeValueForKey:@"isExecuting"]; [self main]; } </code></pre> <p>and:</p> <pre><code>- (void)done { ... // Alert [self willChangeValueForKey:@"isExecuting"]; [self willChangeValueForKey:@"isFinished"]; executing = NO; finished = YES; [self didChangeValueForKey:@"isFinished"]; [self didChangeValueForKey:@"isExecuting"]; } </code></pre> <p>See this Q/A for KVC: <a href="https://stackoverflow.com/questions/3018242/when-to-use-willchangevalueforkey-and-didchangevalueforkey">when to use &quot;willChangeValueForKey&quot; and &quot;didChangeValueForKey&quot;?</a></p>
 

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