• 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
canceling a performSelector:withObject:afterDelay:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

canceling a performSelector:withObject:afterDelay:


  • Subject: canceling a performSelector:withObject:afterDelay:
  • From: DaveM <email@hidden>
  • Date: Sun, 09 May 2010 15:41:44 -0600

Hello

I've been playing with an experimental/demo application to get the hang of timers, and
have come across an issue with canceling a performSelector:withObject:afterDelay:.
Nothing too earth shattering, I was just wanting to use a delay before some processing
to give me a chance to test/watch the rest of the user interface, for example:

performSelector_withObject_afterDelay_("startProcessTimer:", "timer started...", 4) 

It is a short enough delay, but if I want to cancel it and proceed (by using it in a button
handler, for example), I can't seem to get it to cooperate:

cancelPreviousPerformRequestsWithTarget_(me) -- ???:

I am using other timers, which have an instance I can invalidate, but the cancel gives
me an "unrecognized selector" message no matter what I try to put in as the target,
which for lack of a specific definition of "(id)aTarget" I am assuming to be the same
script object (or application or run loop) that started the delay.

I've found few examples of this (mostly iPhone), but as far as I can tell it should be fairly
straightforward to use.  Is this one of those things that needs an ObjC wrapper, or am I
just using it wrong?


Thanks,
Dave

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: canceling a performSelector:withObject:afterDelay:
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: OSAXen
  • Next by Date: Re: canceling a performSelector:withObject:afterDelay:
  • Previous by thread: Re: OSAXen
  • Next by thread: Re: canceling a performSelector:withObject:afterDelay:
  • Index(es):
    • Date
    • Thread