Fork me on GitHub
#hoplon
<
2016-06-23
>
myguidingstar06:06:29

I have a question about javelin

myguidingstar06:06:20

(defc a true) (defc= b (not a))

myguidingstar06:06:05

but I want b to get evaluated after 1 second

myguidingstar06:06:26

(just for animation purpose)

myguidingstar06:06:32

what's the best way to do that?

alandipert11:06:18

@myguidingstar: that'd something you'd need to do outside of javelin - I would make b an input cell. Then add a watch to a. Inside the watch handler, setTimeout code that resets b to (not v) where v is the value of a passed to the watch

myguidingstar11:06:53

@alandipert: thanks, I came up with that, too. It turns out that those animations require a quite complex delay strategy, not just a delay constant 🙂