You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Harald Oehlmann <ha...@elmicron.de> on 2012/02/10 17:28:33 UTC

form -defaults

Dear rivet community,

I am sorry, this is rivet development and here is a user question:

- re-use default values with form

<?
load_response
form form_request -method get -name request -defaults response
form_request start
form_request text code
form_request submit action -value "process"
form_request end
?>

does not show the last values as default when I press the submit button.

When I put debug messages in form.tcl:
- the constructor is not able to get the passed array by upvar 1.
It is not an array.
	if {[info exists arguments(defaults)]} { # this exists
	    set defaults $arguments(defaults) # this works -> response
	    upvar 1 $arguments(defaults) defaults # this does not get an array
	    array set DefaultValues [array get defaults] # this sets an empty array
	    unset arguments(defaults)
	}


I don't know itcl, so:
- is this normal or is that doe to my recent tcl8.6 trunc + itcl 4 trunc ?

---
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

Thank you,
Harald

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


Re: form -defaults

Posted by Harald Oehlmann <ha...@elmicron.de>.
Dear rivet community,

just to inform you, that my issues with the form package were due to a
variable name clash in the constructor of the packages class. I would
not mind if someone could review the patch of bug #52650

Thanks also to Cliff for his valueable posts,
Harald

Am 10.02.2012 17:28, schrieb Harald Oehlmann:
> - re-use default values with form
> 
> <?
> load_response
> form form_request -method get -name request -defaults response
> form_request start
> form_request text code
> form_request submit action -value "process"
> form_request end
> ?>
> 
> does not show the last values as default when I press the submit button.

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