Works in IDE but not the iOS simulator

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Oct 16 03:37:39 CDT 2011


Hi Bill,

I'm surprised that you claim this to work in the IDE. You need to use repeat...with messages and wait...with messages.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

See what you get with only a small contribution. All our LiveCode downloads are listed at http://qery.us/zr

On 16 okt 2011, at 05:32, Bill Vlahos wrote:

> 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




More information about the use-livecode mailing list