Update!
Actually, in this instance, timed messages seem a bit hopeless. I
want my timer to be smoothly updated (i.e. equivalent of 10 fps or
better) during repeated mouse drag operations. With the idle
approach, I could simply call the updateTimer handler from within the
mousedown loop. But If try the same thing with the timed message, it
is sending thousands of "updateTimer in 10 ticks" messages, which
seems to swamp it.
I guess I'm missing something really obvious. But well, I'm a bit thick!
Chris
On 27 Mar 2006, at 20:41, Chris Carroll-Davis wrote:
Richard -
Thanks.
Ha! Yes, I saw that - but I'm an old SC dinosaur so I tend to
stick with what I know! I suppose I'll have to make the switch to
timed messages.
But do you agree that my script *ought* to work? One of the great
things about rev is the ability to use a variety of approaches, so
it's really annoying when you are forced to work in a specific way...
Chris
On 27 Mar 2006, at 19:57, Richard Gaskin wrote:
From the Transcript Dictionary entry for the idle message:
-----------------------------------------------------------
Note: Usually, it is easier and more efficient to use the send in
time form of the send command than to use an idle handler,
especially if a task needs to be executed at regular intervals.
This example shows an idle handler that updates a clock timer:
on idle -- avoid if possible
global startTime
if the seconds > startTime + 60 -- 60 seconds have gone by
put the time into field "Clock Face"
put the seconds into startTime
end if
pass idle
end idle
The following example does the same thing more efficiently, since
it only needs to handle a single message every sixty seconds:
on updateClock -- a better way
put the time into field "Clock Face"
send "updateClock" to me in 60 seconds
end updateClock
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution