<xmlv>
<json/>
<script type="ruby">
$app.listen(8080)
button001 = $button001
app = $app
#while true
# app.send(8080,'localhost','hello')
# puts(app.received())
#end
timer = $app.timer
canvas = $canvas
i = 0
timer.action = lambda{|now|
i = i + 1
app.send(8080,'localhost',i)
canvas.clear()
canvas.text(app.received(),10,50)
}
timer.start()
</script>
</xmlv>
<xmlv title="Sample Display">
<json>
[{"type":"button","id":"button001","x":10,"text":"click me"}]
</json>
<script type="Latte-lang">
println('Hello Latte')
button001.action = ((event) -> button001.text = "Got clicked")
timer = app.timer
timer.action = ((now) -> button001.x = button001.x + 1)
timer.start()
</script>
</xmlv>