Index: openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 1 Nov 2003 08:45:37 -0000 1.10 +++ openacs-4/packages/acs-templating/tcl/spellcheck-procs.tcl 3 Nov 2003 12:32:38 -0000 1.11 @@ -194,7 +194,10 @@ set language "--lang=$language" } - if { [catch { set ispell_proc [open "|$spelling_wrapper [ns_info home] $spellchecker_path $language $dictionaryfile $tmpfile" r] } errmsg] } { + # Caveat: The "open" arg must be a list (not a string) to allow the wrapper args to be the empty string + # (which $language will be when ispell is used, for instance) + + if { [catch { set ispell_proc [open [list |$spelling_wrapper [ns_info home] $spellchecker_path $language $dictionaryfile $tmpfile] r] } errmsg] } { ad_return_error "Webspell could not be executed" "Spell-checking is enabled but the spell-check wrapper ([acs_root_dir]/bin/webspell) could not be executed. Check that the wrapper exists, and that its permissions are correct.

Here is the error message:

$errmsg
" ad_script_abort } @@ -255,7 +258,7 @@ incr error_num } &* { - regexp "^& (\[^ \]+) (\[0-9\]+) (\[0-9\]+): (.*)$" $ispell_line dummy word n_options pos options + regexp {^& ([^ ]+) ([0-9]+) ([0-9]+): (.*)$} $ispell_line dummy word n_options pos options regsub $word $line "\#$error_num\#" line lappend errors [list nearmiss $error_num $word $options] incr error_num Index: openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 9 Oct 2003 13:22:32 -0000 1.3 +++ openacs-4/packages/acs-templating/tcl/test/spell-checker-procs.tcl 3 Nov 2003 12:32:38 -0000 1.4 @@ -147,7 +147,7 @@ aa_register_case spellcheck__spellcheck_properties { Test the proc that knows if spell-checking is activated, if it should be performed, - and whether the radio buttons should default to "Yes" or "No". + and which value the pull-down menu should default to. } { array set element { id test_element @@ -160,9 +160,9 @@ aa_log "--- Spell-checking enabled on widget \"$element(widget)\"? --- $command" array set spellcheck [eval $command] - aa_false "Spell-checking disabled" $spellcheck(perform_p) + aa_false "Spell-checking disabled" $spellcheck(render_p) - if { $spellcheck(perform_p) } { + if { $spellcheck(render_p) } { aa_log "$spellcheck(selected_option) is the default" } @@ -172,9 +172,9 @@ aa_log "--- Spell-checking enabled on widget \"$element(widget)\"? --- $command" array set spellcheck [eval $command] - aa_true "Spell-checking enabled" $spellcheck(perform_p) + aa_true "Spell-checking enabled" $spellcheck(render_p) - if { $spellcheck(perform_p) } { + if { $spellcheck(render_p) } { aa_log "$spellcheck(selected_option) is the default" } @@ -184,10 +184,10 @@ aa_log "--- Spell-checking enabled on widget \"$element(widget)\"? --- $command" array set spellcheck [eval $command] - aa_true "Spell-checking enabled" $spellcheck(perform_p) + aa_true "Spell-checking enabled" $spellcheck(render_p) - if { $spellcheck(perform_p) } { + if { $spellcheck(render_p) } { aa_log "$spellcheck(selected_option) is the default" } -} \ No newline at end of file +}