Re: Repeating wrong
Re: Repeating wrong
- Subject: Re: Repeating wrong
- From: Shane Stanley <email@hidden>
- Date: Fri, 15 Jan 2010 09:51:30 +1100
- Thread-topic: Repeating wrong
First, avoid using delay in ASObjC -- all other things aside, it kicks
processor use up to 100% or more.
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_
You shouldn't need that check for sender's intValue(), either.
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
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