Katsuyuki Katayama has a nifty Timer sample program in RevOnline. It is a 
stopwatch program that lets you start and stop the timer.

In the IDE the start button and stop buttons work as expected. However, in the 
iOS Simulator you can start it but you can't stop it.

Why?

Here is the code from the "start" button.
on mouseUp
   put empty into Bigin
   put empty into Now
   put empty into Timer
   put empty into field "Time"
   put empty into count

   if the hilite of button "start"  is true
   then
      set the hilite of button "stop"  to false
   end if
   
   get the seconds
   put it into Bigin
   
   repeat while the hilite of button "start" is true
      get the seconds
      put it into Now
      put Now - Bigin into Timer
      put Timer into field "Time"
      wait for 100 milliseconds

       if the mouseClick
      --the hilite of button "stop" is true
       then
          exit repeat
          --set the hilite of button "start" to false
       end if
   end repeat
end mouseUp


Here is the code from the "stop" button
on mouseUp
      if the hilite of button "stop"  is true
   then
      set the hilite of button "start"  to false
   end if
end mouseUp

Bill Vlahos
_________________
InfoWallet (http://www.infowallet.com) is about keeping your important life 
information with you, accessible, and secure.


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to