<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
The subject of your message seems to be a clear description of a
particular kind of example, which I will claim is already present in
one of the main demos:<br>
<a class="moz-txt-link-freetext" href="http://www.impredicative.com/ur/demo/react.html">http://www.impredicative.com/ur/demo/react.html</a><br>
<br>
I think you've already found this one and the more complicated
'increment' demo. Maybe your question, then, has to do with the
further complication that you introduce below.<br>
<br>
<div class="moz-cite-prefix">On 08/13/2015 11:38 PM, Stefan Scott
Alexander wrote:<br>
</div>
<blockquote
cite="mid:CAFwK6augqTSMQ-EtG-rM37+C+VOmEzh2Zt9ryptC0PBcqqfWEA@mail.gmail.com"
type="cite">
<div dir="ltr"><font face="monospace, monospace">(3) Initial
coding attempt:</font>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">I thought I could just
make some minor modifications, to change the <cselect>
in (1) to a <textbox>, as follows:</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div>
<div style="font-family:monospace,monospace">fun main () =</div>
<div style="font-family:monospace,monospace"> s <-
source "";</div>
<div style="font-family:monospace,monospace"> return
<xml><body></div>
<div style="font-family:monospace,monospace"> <textbox
source={s} onchange={v <- get s; alert ("Now it's " ^
v)}></div>
<div style="font-family:monospace,monospace">
</textbox></div>
<div style="font-family:monospace,monospace"><br>
</div>
<div style="font-family:monospace,monospace"> Hello, I'm
<dyn signal={s <- signal s; return
<xml>{[s]}</xml>}/>.</div>
<div style="font-family:monospace,monospace">
</body></xml><br>
</div>
</div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">However, this is giving
lots of compile errors. </font></div>
</div>
</blockquote>
<br>
The problem here is just that you need <ctextbox> instead of
<textbox>. The 'c' is for "client-side scripting."<br>
<br>
<blockquote
cite="mid:CAFwK6augqTSMQ-EtG-rM37+C+VOmEzh2Zt9ryptC0PBcqqfWEA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><font face="monospace, monospace">(4) Ultimately, what I
want to develop is:</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">(a) a <textbox> on
the client, called `txbx`, which the user can change by
typing</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">(b) a table `t` on the
server, which will be "live-queryable" using the
<textbox>:</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">(c) when user types
something different in the <textbox>, there is an
<xml> fragment below the <textbox> which
instantly changes:</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">eg - the <xml>
fragment might be something like this:</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"> return queryX1 (SELECT
Nam FROM t WHERE Nam LIKE '*' ^ {[txbx]} '*')</font></div>
<div><font face="monospace, monospace"> (fn r
=> <xml>{[r.Nam]}<br/></xml>);</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">I can't even get the
simpler case (3) above to work. After I get (3) to work,
then I can try (4).</font></div>
</div>
</blockquote>
<br>
<font face="monospace, monospace">It's only possible to implement
server-side interaction through RPCs. You probably want an event
handler that blocks on an RPC</font> result and then updates
client-side sources appropriately when the results come in.<br>
</body>
</html>