Re: rerunning an NSOperation object
Re: rerunning an NSOperation object
- Subject: Re: rerunning an NSOperation object
- From: Matt Neuburg <email@hidden>
- Date: Sun, 06 Mar 2011 12:32:58 -0800
On Sat, 05 Mar 2011 21:33:43 -0600, Shane <email@hidden> 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 can't be reused.
>So it has finished executing, and I'd like to know how to execute it
>again
You just quoted the docs as saying you *can't* "execute it again".
> but w/o having to build a new object
If you want another NSOperation you're going to *have* to build a new object. Your reluctance to do so (and even to accept what the docs are plainly telling you) suggests you may just need to refactor somehow. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________
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