Clock problem...
Posted: Wed Oct 03, 2012 12:10 pm
Greetings:
I'm developing an app which will, amongst other things, display a digital clock.
I have created six label fields which will display the six digits of hh:mm:ss using an LCD font.
(I am developing at the moment in Windows, altho the app is destined for iOS.)
I thought this would be fairly simple, and altho the flwg code works, there is a problem...
When the clock is running, I can't do much in Livecode, like continue editing the app. The clock seems to take over the computer. If I type a few characters in the editor, everything freezes and I have to press ctrl'.' to stop the app.
Clearly I am doing something wrong. Is there a better way to handle clocks/timers that run constantly.
TIA for any help...
--paul
I'm developing an app which will, amongst other things, display a digital clock.
I have created six label fields which will display the six digits of hh:mm:ss using an LCD font.
(I am developing at the moment in Windows, altho the app is destined for iOS.)
I thought this would be fairly simple, and altho the flwg code works, there is a problem...
Code: Select all
command RunClock
repeat
put the long time into tTime
replace ":" with " " in tTime
put character 1 of word 1 of tTime into fld "LblCLKd5"
put character 2 of word 1 of tTime into fld "LblCLKd4"
put character 1 of word 2 of tTime into fld "LblCLKd3"
put character 2 of word 2 of tTime into fld "LblCLKd2"
put character 1 of word 3 of tTime into fld "LblCLKd1"
put character 2 of word 3 of tTime into fld "LblCLKd0"
wait 100 milliseconds with messages
end repeat
end RunClock
on openCard
RunClock
end openCard
Clearly I am doing something wrong. Is there a better way to handle clocks/timers that run constantly.
TIA for any help...
--paul