[Ur] Minimal example generating a node id with fresh and using it in a form handler
Stefan Scott Alexander
stefanscottalexx at gmail.com
Thu Aug 6 18:27:27 EDT 2015
Actually I just remembered that a node `id` and something of kind `Name`
are two different things.
So I probably want my code to look more like this:
fun main () =
nid <- fresh;
let
fun handler r =
return
<xml><body>
{[r.AName]}
</body></xml>
in
return
<xml><body><form>
<textbox{#AName} id={nid}/>
<submit action={handler}/>
</form></body></xml>
end
This compiles and runs.
This is a minimal, initial example. Later it will be extended using FFI to
include a JavaScript datepicker library.
###
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20150806/01f9561c/attachment.html>
More information about the Ur
mailing list