annotate tests/megaform.ur @ 1739:c414850f206f

Add support for -boot flag, which allows in-tree execution of Ur/Web The boot flag rewrites most hardcoded paths to point to the build directory, and also forces static compilation. This is convenient for developing Ur/Web, or if you cannot 'sudo make install' Ur/Web. The following changes were made: * Header files were moved to include/urweb instead of include; this lets FFI users point their C_INCLUDE_PATH at this directory at write <urweb/urweb.h>. For internal Ur/Web executables, we simply pass -I$PATH/include/urweb as normal. * Differentiate between LIB and SRCLIB; SRCLIB is Ur and JavaScript source files, while LIB is compiled products from libtool. For in-tree compilation these live in different places. * No longer reference Config for paths; instead use Settings; these settings can be changed dynamically by Compiler.enableBoot () (TODO: add a disableBoot function.) * config.h is now generated directly in include/urweb/config.h, for consistency's sake (especially since it gets installed along with the rest of the headers!) * All of the autotools build products got updated. * The linkStatic field in protocols now only contains the name of the build product, and not the absolute path. Future users have to be careful not to reference the Settings files to early, lest they get an old version (this was the source of two bugs during development of this patch.)
author Edward Z. Yang <ezyang@mit.edu>
date Wed, 02 May 2012 17:17:57 -0400
parents 21f6d2e65685
children
rev   line source
adamc@760 1 fun handler'' ls =
adamc@760 2 case ls of
adamc@760 3 Nil => <xml/>
adamc@760 4 | Cons (r, ls) => <xml><li>{[r.C]}</li>{handler'' ls}</xml>
adamc@760 5
adamc@760 6 fun handler' ls =
adamc@760 7 case ls of
adamc@760 8 Nil => <xml/>
adamc@760 9 | Cons (r, ls) => <xml><li>{[r.Sub.A]} <ul>{handler'' r.Sub.Sub2}</ul></li>{handler' ls}</xml>
adamc@760 10
adamc@760 11 fun handler r = return <xml><body>
adamc@760 12 {[r.A]}
adamc@760 13 <ul>{handler' r.Sub}</ul>
adamc@760 14 {[r.C]}<br/>
adamc@760 15 {[r.Sub2.A]}<br/>
adamc@760 16 {handler'' r.Sub2.Nested}
adamc@760 17 </body></xml>
adamc@760 18
adamc@760 19 fun main () = return <xml><body>
adamc@760 20 <form>
adamc@760 21 <textbox{#A}/><br/>
adamc@760 22 <subforms{#Sub}>
adamc@760 23 <entry>
adamc@760 24 <subform{#Sub}>
adamc@760 25 <textbox{#A}/><br/>
adamc@760 26 <subforms{#Sub2}>
adamc@760 27 <entry>
adamc@760 28 <textbox{#C}/><br/>
adamc@760 29 </entry>
adamc@760 30
adamc@760 31 <entry>
adamc@760 32 <textbox{#C}/><br/>
adamc@760 33 </entry>
adamc@760 34 </subforms>
adamc@760 35 </subform>
adamc@760 36 </entry>
adamc@760 37
adamc@760 38 <entry>
adamc@760 39 <subform{#Sub}>
adamc@760 40 <textbox{#A}/><br/>
adamc@760 41 <subforms{#Sub2}>
adamc@760 42 <entry>
adamc@760 43 <textbox{#C}/><br/>
adamc@760 44 </entry>
adamc@760 45
adamc@760 46 <entry>
adamc@760 47 <textbox{#C}/><br/>
adamc@760 48 </entry>
adamc@760 49 </subforms>
adamc@760 50 </subform>
adamc@760 51 </entry>
adamc@760 52 </subforms>
adamc@760 53 <textbox{#C}/><br/>
adamc@760 54
adamc@760 55 <subform{#Sub2}>
adamc@760 56 <textbox{#A}/><br/>
adamc@760 57
adamc@760 58 <subforms{#Nested}>
adamc@760 59 <entry>
adamc@760 60 <textbox{#C}/>
adamc@760 61 </entry>
adamc@760 62 </subforms>
adamc@760 63 </subform><br/>
adamc@760 64
adamc@760 65 <submit action={handler}/>
adamc@760 66 </form>
adamc@760 67 </body></xml>