Time field (please help)

Geoff Canyon gcanyon at inspiredlogic.com
Sun Mar 3 17:18:01 EST 2002


At 1:19 PM -0800 3/3/02, Rob Cozens wrote:
>>> Question:  What happens when the user goes to another card or another
>>> stack?  Must one take some action on closeCard/closeStack to stop
>>> updateTime from continuing to send messages every second?
>>
>>I wondered about this myself too.
>
>Looks like you & I will have to wait for the experts, Terry.

Whenever you use send...in, the result is set to the message id. Sometimes people put that into a global. You could also use a property. The following allows cancelling the message with only the use of a local -- note that the local declaration outside any handlers makes it local through all the handlers, a neat trick:

local tUpdateTimeMessage

on updateTime
  put the long time into me
  send updateTime to me in 1 second
  put the result into tUpdateTimeMessage
end updateTime

on cancelUpdateTime
  cancel tUpdateTimeMessage
end cancelUpdateTime

regards,

Geoff



More information about the use-livecode mailing list