Hi -

I'm trying to do a minimal example:

- generating a node id using [fresh] - from section 8.6.2 of the manual; and

- using the node id in a form handler - similar to the Form demo:

  http://www.impredicative.com/ur/demo/form.html

(This is in preparation for other code which will use JavaScript FFI.)

My minimal code is something like the following, but it does not compile
due to the obvious syntax errors involving [nid].

fun main () =
  nid <- fresh;
  let
  fun handler r =
    return
      <xml><body>
        {[r.nid]}
      </body></xml>
  in
    return
    <xml><body><form>
      <textbox{nid}/>
      <submit action={handler}/>
    </form></body></xml>
  end

I can't figure out the correct syntax, for:

- using [nid] created by [fresh] and as the id for a textbox; and

- accessing the value in the textbox, via a form handler.

Thanks for any help!

###
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to