[Ur] New feature round-up

Adam Chlipala adamc at impredicative.com
Sun Jul 22 07:31:42 EDT 2012


Edward Z. Yang wrote:
> In case anyone is wondering, the pattern of, "Give me a piece of form input
> which autofocuses itself when it's in the document", doing the obvious:
>
>      <ctextbox id={nid} />
>      <active code={giveFocus nid} />
>
> Doesn't work:<active>  seems to get run too early.
>
> This seems to work OK:
>
>      <ctextbox id={nid} />
>      <active code={spawn (sleep 1; giveFocus nid)} />
>
> You do need the sleep, unfortunately, so this is all a bit delicate.

Hmm... that wasn't intentional.  I'll look into it.

(I think the [spawn] above is superfluous, BTW.)



More information about the Ur mailing list