Repeating wrong
Repeating wrong
- Subject: Repeating wrong
- From: "John C. Welch" <email@hidden>
- Date: Thu, 14 Jan 2010 16:24:15 -0500
- Thread-topic: Repeating wrong
Title: Repeating wrong
Next stupid question.
I have some code that I want to run once a second when a button is pushed, and run forever, until the button is pushed again.
The basic part I've got. Push the button, code runs. However, the way that seemed obvious to me:
on trackWifiStats_(sender) --this runs when you click the "track" button in the main window
log sender's intValue()
if sender's intValue() is 1 then
repeat
delay 1
loadData(theCurrentInterface) of me
log "refreshed data"
end repeat
end if
end trackWifiStats_
is obviously wrong, as once that repeat loop kicks in , the application's UI is unresponsive. So I’m going to hazard there’s a better way to do this?
--
Magister Mundi sum!
(I am the Master of the Universe!)
_______________________________________________
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