Re: rerunning an NSOperation object

2011-03-06 Thread Matt Neuburg
On Sat, 05 Mar 2011 21:33:43 -0600, Shane said: >I then see that the "NSOperationQueue Class Reference" says this about >addOperation: ... >"Similarly, this method throws an NSInvalidArgumentException exception >if the operation is currently executing or has already finished >executing." So they

Re: rerunning an NSOperation object

2011-03-06 Thread Robert Monaghan
Hi Shane, NSOperationQueue will not let you re-run a previously run NSOperation Object. What I did to get around the problem was to create my own NSObject that does what I want. I then wrapped the object with an NSOperation object to run. Once complete, I can simply re-use my NSObject by wrappin

Re: rerunning an NSOperation object

2011-03-05 Thread Robert Martin
From the docs for NSOperation: ... "An operation object is a single-shot object—that is, it executes its task once and cannot be used to execute it again." On Mar 5, 2011, at 10:33 PM, Shane wrote: > I have an NSOperation object that has been placed in an > NSOperationQueue. I then execute th

rerunning an NSOperation object

2011-03-05 Thread Shane
I have an NSOperation object that has been placed in an NSOperationQueue. I then execute that NSOperation and all works normal. What I'd like to do is then run that task again, however, when I do run it I get the following error when trying to add that object to the queue again. Caught NSInvalid