comparison lib/js/urweb.js @ 835:b0a85cbefed2

Less whining about match failures; fix singleton record Jscomp bug
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Jun 2009 12:40:09 -0400
parents 5e1a4b12c83a
children 5154a047c6bc
comparison
equal deleted inserted replaced
834:74e9e7642f08 835:b0a85cbefed2
29 alert(msg); 29 alert(msg);
30 throw msg; 30 throw msg;
31 } 31 }
32 32
33 function pf(loc) { 33 function pf(loc) {
34 whine("Pattern match failure (" + loc + ")"); 34 throw ("Pattern match failure (" + loc + ")");
35 } 35 }
36 36
37 function runHandlers(kind, ls, arg) { 37 function runHandlers(kind, ls, arg) {
38 if (ls == null) 38 if (ls == null)
39 alert(kind + ": " + arg); 39 alert(kind + ": " + arg);
316 316
317 function sel(s, content) { 317 function sel(s, content) {
318 var x = input("select", s, function(x) { return function(v) { if (x.value != v) x.value = v; }; }); 318 var x = input("select", s, function(x) { return function(v) { if (x.value != v) x.value = v; }; });
319 x.innerHTML = content; 319 x.innerHTML = content;
320 x.value = s.data; 320 x.value = s.data;
321 if (x.value != s.data)
322 sv(s, x.value);
321 x.onchange = function() { sv(s, x.value) }; 323 x.onchange = function() { sv(s, x.value) };
324
322 325
323 return x; 326 return x;
324 } 327 }
325 328
326 function chk(s) { 329 function chk(s) {