Mercurial > urweb
diff src/monoize.sml @ 1783:5bc4fbf9c0fe
New event records for key and mouse handlers
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 21 Jul 2012 10:02:53 -0400 |
parents | 818d4097e2ed |
children | d794149b3713 |
line wrap: on
line diff
--- a/src/monoize.sml Wed Jul 18 17:29:13 2012 -0400 +++ b/src/monoize.sml Sat Jul 21 10:02:53 2012 -0400 @@ -3311,8 +3311,14 @@ val e = case #1 dom of L'.TRecord [] => (L'.EApp (e, (L'.ERecord [], loc)), loc) - | _ => (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "kc", []), loc)), - loc), (L'.ERecord [], loc)), loc) + | _ => + if String.isPrefix "Onkey" x then + (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "keyEvent", []), loc)), + loc), (L'.ERecord [], loc)), loc) + else + (L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "mouseEvent", []), loc)), + loc), (L'.ERecord [], loc)), loc) + val s' = " " ^ lowercaseFirst x ^ "='uw_event=event;exec(" in ((L'.EStrcat (s,