view tests/updateErr.ur @ 1998:cc7e5d469d1b

Protect uw_Basis_new_client_source from invalid ctx->id We assume that FFI code may create new contextes with id left unassigned
author Sergey Mironov <grrwlf@gmail.com>
date Wed, 26 Feb 2014 09:43:47 +0000
parents abb0e95dcaa1
children
line wrap: on
line source
fun main () : transaction page =
    s <- source "";
    b <- Buffer.create;
    txt <- source "";

    return <xml><body onload={onError (fn xml => Buffer.write b (show xml));
                              onFail (fn s => alert ("FAIL! " ^ s))}>
      <dyn signal={s <- signal s; return <xml>{[s]}</xml>}/><br/>
      <dyn signal={s <- signal s; if s = "" then return <xml>Init</xml> else error <xml>Crapky</xml>}/><br/>
      <dyn signal={s <- signal s; return <xml>"{[s]}"</xml>}/><br/>
      <button onclick={fn _ => debug "88"}/><br/>

      <ctextbox source={txt}/> <button onclick={fn _ => s' <- get txt; set s s'; set txt ""}/>

      <hr/>

      <dyn signal={Buffer.render b}/>
    </body></xml>