[
"do",
["def", "app_x", 50],
["def", "app_y", 250],
["def", "render", [],
["dispatch",
["str", "ui-render"],
["array",
["record",
["str", "id"], ["str", "win-ast-app"],
["str", "title"], ["str", "Distributed AST App"],
["str", "x"], "app_x",
["str", "y"], "app_y",
["str", "w"], 350,
["str", "h"], 150,
["str", "z"], 50,
["str", "content"], ["str", "<div style='padding:15px;'>My X, Y
coordinates are managed by JSON-Lisp.<br><br>Try dragging me!</div>"]
]
],
["record"]
]
],
["def", "on_event", ["intent_data"],
["do",
["def", "event_type", ["get_idx", 1, "intent_data"]],
["if", ["eq", "event_type", ["str", "window-move"]],
["do",
["set", "app_x", ["get_idx", 3, "intent_data"]],
["set", "app_y", ["get_idx", 4, "intent_data"]],
["call", "render", []]
],
false
]
]
],
["call", "render", []]
]