On Fri, Feb 10, 2012 at 05:28:33PM +0100, Harald Oehlmann wrote:
> ...
> I also tried Clif Flints tclOO-version.
> It complains on the call
>       form form_request -method get -name request -defaults response
> about: wrong method: use new, create or delete

I'm not sure about defaults, but here's a code snippet using the
TclOO form command.  The big caveat on this code is that it works
for the features I needed, but I didn't have time to run it through
complete testing.

  form create spForm -method post -name create
  spForm start

  foreach {fld txt size} {
  name  "Unit Name" 50} {
    if {![var exists $fld]} {set $fld ""} else {set $fld $vals($fld)}
    html $txt b
    spForm text $fld -size $size -value [set $fld]
    html <br>
  }

  html "Type of Unit" b
  html "(Private is controlled access. Public are groups anyone can join)"
  html "" br
  spForm radiobuttons payInfo -values "paid free" -labels "Private Public"

  spForm hidden displayed -value 1
  html "" br
  spForm submit submit -value "Create"
  spForm end

Hope this helps,
Clif

-- 
... Clif Flynt ... http://www.cwflynt.com ... c...@cflynt.com ...
.. Tcl/Tk: A Developer's Guide (3'd edition) - Morgan Kauffman ..
.... 19'th Annual Tcl/Tk Conference:  2012, Chicago, IL  USA ....
.............  http://www.tcl.tk/community/tcl2012/  ............






---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to