• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
rerunning an NSOperation object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: rerunning an NSOperation object
      • From: Robert Monaghan <email@hidden>
    • Re: rerunning an NSOperation object
      • From: Robert Martin <email@hidden>
  • Prev by Date: Re: Outlets Not Connected In awakeFromNib
  • Next by Date: Re: rerunning an NSOperation object
  • Previous by thread: Re: NSImageView mouseUp problem?
  • Next by thread: Re: rerunning an NSOperation object
  • Index(es):
    • Date
    • Thread