Posted to tcl by colin at Wed Jul 29 09:33:48 GMT 2009view raw
- Nub code /select/ {
- <form> action /deliver/ method post [subst {
- [<fieldset> fs title "Select Item" {
- [<text> number legend "Item Number:" {}]
- [<submit> submit Ok]
- }]
- }]
- }
- Nub code /deliver/ {
- dict set r -Query [Query parse $r]
- set query [Query flatten [dict get $r -Query]]
- set number [dict get $query number]
- # ... TODO run the process as an [open |prog], consume the input and call [done $r $content]
- return [Httpd Suspend $r 100000]
- }
- proc done {r content} {
- dict set r -content $content
- dict set r content-type application/pdf
- Httpd Resume $r
- }