• 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
Re: rerunning an NSOperation object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: binding relationship to checkbox
  • Next by Date: Re: NSBrowser & column resizing
  • Previous by thread: Re: rerunning an NSOperation object
  • Next by thread: Why Annotations callout sometimes not work ?
  • Index(es):
    • Date
    • Thread