Re: Repeating wrong
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