It is almost never safe to assume your code is perfect
Kay C Lan
lan.kc.macmail at gmail.com
Fri Oct 4 12:51:00 CEST 2013
I'm not sure what the original context was, so I guess there was a need for
'the long seconds', but I just created two clock faces and ran one against
your original code, and the other with the 2 references to the long seconds
removed, i.e it just updates every second.
The outputs are identical.
So no less lines of code but about 50 chars less typing.
On Fri, Oct 4, 2013 at 6:36 AM, Geoff Canyon <gcanyon at gmail.com> wrote:
> on setTime
> put word 1 of the long time into T
> put T && the long seconds into fld "time"
> split T using ":"
> set the startangle of grc "second" to 90 - (6 * T)
> if T mod 10 = 0 then set the startangle of grc "minute" to 90 - (6 *
> T) - (T div 10)
> if T mod 10 = 0 and T mod 2 = 0 then set the startangle of grc
> "hour" to 90 - (30 * T) - (T div 2)
> send "setTime" to me in (1 - (the long seconds mod 1)) seconds
> end setTime
> Never be satisfied.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode