[Ur] Invalid Action expression

Sergey Mironov grrwlf at gmail.com
Sun Jul 20 16:08:23 EDT 2014


Hi! Here is another error I've faced when trying to write a
styling-wrapper for my submit buttons:

$ urweb -dbms sqlite Submit
/home/grwlf/proj/urbugs/Submit.ur:21:89: (to 21:90) Invalid Action expression
Expression UNBOUND_0

See the trivial example below. Please, consider fixing! Without
sbm-like wrappers I am forced to repeat submit code from form to
form..
Regards,
Sergey

--

style mystyle

con ct = [A = string, B = string]

fun handler (x:$ct) : transaction page = return
<xml><head/><body>{[x.A]}{[x.B]}</body></xml>

fun sbm [t:::{Type}] (h : $t -> transaction page) : xml form t [] =
<xml><div class={mystyle}><submit action={h}
value="Send"/></div></xml>

fun main {} = return <xml><head/><body>
  <br/>
  <form>
  <textbox{#A}/>
  <textbox{#B}/>
  {sbm handler}
  </form>
  </body></xml>



More information about the Ur mailing list