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

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

  • Follow-Ups:
    • Re: Repeating wrong
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: applescriptobjc-dev Digest, Vol 3, Issue 4
  • Next by Date: Re: applescriptobjc-dev Digest, Vol 3, Issue 4
  • Previous by thread: Re: applescriptobjc-dev Digest, Vol 3, Issue 4
  • Next by thread: Re: Repeating wrong
  • Index(es):
    • Date
    • Thread