Notifications
Clear all
[Closed] Closing rollout after time
Mar 16, 2017 12:33 pm
Hi,
So this is a piece of code
rollout test "Test Timer"
(
timer clock "testClock" interval:1000 --tick once a second
label test"1"
on clock tick do
(
valUp = (test.text as integer)+1
test.text = valUp as string
if valUp == 10 do (
print "Closing"
try(destroyDialog test)catch()
)
)
)
createDialog test
I want the rollout to close after 10 seconds, but try(destroyDialog test)catch() does not do the trick
EDIT: I took this code from help and didnt see that there is a naming conflict. This one DOES work
rollout testRoll "Test Timer"
(
timer clock "testClock" interval:1000 --tick once a second
label test"1"
on clock tick do
(
valUp = (test.text as integer)+1
test.text = valUp as string
if valUp == 10 do (
print "Closing"
try(destroyDialog testRoll)catch()
)
)
)
createDialog testRoll
1 Reply