• 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: Repeating wrong
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repeating wrong


  • Subject: Re: Repeating wrong
  • From: "John C. Welch" <email@hidden>
  • Date: Thu, 14 Jan 2010 18:36:31 -0500
  • Thread-topic: Repeating wrong

On 1/14/10 5:51 PM, "Shane Stanley" <email@hidden> wrote:

> You should make an NSTimer, which will repeatedly call a handler:
>
> on trackWifiStats_(sender)
> set theTimer to current application's NSTimer's
> scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(1, me,
> "timerFired:", "Whatever", true)
> end trackWifiStats_
>
> on timerFired_(theTimer) -- called by timer
>     -- do your stuff
>     -- To stop, use:
>     -- theTimer's invalidate()
> end timerFired_
>

That did the trick, although how to implement invalidate() is giving my
cold-fuzzled brain some fits. Sigh...I always feel like I'm *this* close to
getting it, and yet it stands over there laughing at me.


> You shouldn't need that check for sender's intValue(), either.

Why not? I'm not being smarmy, genuinely curious here. Eventually, there's
going to be a few things kicked off when I hit the "track" button, including
file updates and graphing. Since the button is an on/off, how do I know what
state it's in?

--
"It's like a koala crapped a rainbow in my brain!"
Captain Murphy, Sealab 2021


 _______________________________________________
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: Repeating wrong
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Repeating wrong (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Repeating wrong
  • Next by Date: Re: Repeating wrong
  • Previous by thread: Re: Repeating wrong
  • Next by thread: Re: Repeating wrong
  • Index(es):
    • Date
    • Thread