Excerpts from Adam Chlipala's message of Sat Jul 21 14:01:12 -0400 2012:
> - The function [Basis.giveFocus] makes it possible to give a tag focus 
> by ID.
> - A new pseudo-tag allows embedding of a [transaction] in HTML, where 
> this code is run to determine what HTML should go in that position, 
> possibly first allocating [source]s or causing other side effects.  Use 
> like: <active code={return <xml>Hi!</xml>}/>

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.

Cheers,
Edward

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

Reply via email to