rerunning an NSOperation object
rerunning an NSOperation object
- Subject: rerunning an NSOperation object
- From: Shane <email@hidden>
- Date: Sat, 05 Mar 2011 21:33:43 -0600
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 NSInvalidArgumentException*** -[NSOperationQueue
addOperation:]: operation is finished and cannot be enqueued
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 it has finished executing, and I'd like to know how to execute it
again but w/o having to build a new object. Is there a way to rerun an
NSOperation object, or should I do something else besides call
addOperation: again?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden