Skip to content

Commit

Permalink
Update: hg rev 175b6d52252d
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Seipp committed Jul 16, 2011
1 parent 335f90c commit 7b28143
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG
@@ -1,3 +1,22 @@
========
20110715
========

- Treat local variables the same as module-level variables, for the purpose of
implicit argument insertion
- New 'noXsrfProtection' directive for .urp files
- Non-debug builds omit source location information in error messages shown to
the user (but keep that information in log entries)
- Basis.getHeader and Basis.setHeader
- Basis.show_css_class
- Basis.currentUrlHasQueryString
- Make Basis.rand cryptographically secure
- Client-side versions of Basis.now and Basis.show_time
- Bug fixes
- Improvements to auto-configuration and build process (now builds with LLVM's
Clang!)
- Clarifications in the manual

========
20110517
========
Expand Down
14 changes: 8 additions & 6 deletions lib/js/urweb.js
Expand Up @@ -277,11 +277,13 @@ function sc(v) {
return {data : v, dyns : null};
}
function sv(s, v) {
s.data = v;
if (s.data != v) {
s.data = v;

for (var ls = s.dyns; ls; ls = ls.next)
if (!ls.dead)
populate(ls.data);
for (var ls = s.dyns; ls; ls = ls.next)
if (!ls.dead)
populate(ls.data);
}
}
function sg(s) {
return s.data;
Expand Down Expand Up @@ -491,7 +493,7 @@ function inp(s, name) {
var x = input(document.createElement("input"), s,
function(x) { return function(v) { if (x.value != v) x.value = v; }; }, null, name);
x.value = s.data;
x.onkeyup = function() { sv(s, x.value) };
x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) };

return x;
}
Expand Down Expand Up @@ -545,7 +547,7 @@ function tbx(s) {
var x = input(document.createElement("textarea"), s,
function(x) { return function(v) { if (x.innerHTML != v) x.innerHTML = v; }; });
x.innerHTML = s.data;
x.onkeyup = function() { sv(s, x.value) };
x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) };

return x;
}
Expand Down
11 changes: 11 additions & 0 deletions tests/autocomp.ur
@@ -0,0 +1,11 @@
fun main () : transaction page =
a <- source "";
b <- source "";
return <xml><body>
<form>
<textbox{#A} source={a}/>
<button onclick={x <- get a; set b x}/>
<dyn signal={v <- signal a; return <xml>{[v]}</xml>}/>
/ <dyn signal={v <- signal b; return <xml>{[v]}</xml>}/>
</form>
</body></xml>

0 comments on commit 7b28143

Please sign in to comment.