Page 1 of 1

Problem in Time field

Posted: Fri Jul 03, 2015 7:50 am
by shalu
Hi,

I am beginner in Livecode. I am crete a field for showing the current time, my problem is once I close stack after when I open the stack it doesn't show the current time also it not running, I am using the following code

Code: Select all

on showTime
  put the long time into fld "Time"
  send "showTime" to me in 100 milliseconds
end showTime

 

Re: Problem in Time field

Posted: Fri Jul 03, 2015 8:28 am
by jmburnod
Hi Shalu,

Do you have an openstack handler

Code: Select all

on openstack
showTime
end openstack
Best regards
Jean-Marc

Re: Problem in Time field

Posted: Fri Jul 03, 2015 10:03 pm
by dunbarx
Perhaps Jean-Marc's post told you everything you needed to know.

You must have started that handler in the first place in some fashion, no? Perhaps in a button script, a mouseUp handler sets it going? Whatever.

In the same way, a message is sent when you open a stack, and you can trap it to do whatever you need to, like start that handler again. This is a great tool to get to know, as well as its counterpart, "closeStack"

Craig Newman