Index: openacs-4/packages/xotcl-core/www/show-object.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/show-object.adp,v diff -u -r1.9.2.2 -r1.9.2.3 --- openacs-4/packages/xotcl-core/www/show-object.adp 30 Dec 2015 18:09:14 -0000 1.9.2.2 +++ openacs-4/packages/xotcl-core/www/show-object.adp 31 Dec 2015 13:15:39 -0000 1.9.2.3 @@ -1,6 +1,7 @@ @title;literal@ @context;literal@ + Index: openacs-4/packages/xotcl-core/www/show-object.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/show-object.tcl,v diff -u -r1.22.2.5 -r1.22.2.6 --- openacs-4/packages/xotcl-core/www/show-object.tcl 30 Dec 2015 18:09:14 -0000 1.22.2.5 +++ openacs-4/packages/xotcl-core/www/show-object.tcl 31 Dec 2015 13:15:39 -0000 1.22.2.6 @@ -153,28 +153,27 @@ set pretty_parameter "" set line "[::xo::api object_link $scope $c] create ..." set parameters [lsort [DO xo::getObjectProperty $c parameter]] - if {$parameters ne ""} { - set length [expr {6 + [string length $c]}] + if {[llength $parameters] > 0} { + # + # Initial line length is length of class name + "create" + "..." + + # white space + # + set llength [expr {8 + [string length $c]}] + set pstart " \\
[string repeat { } 10]" + foreach p $parameters { - if {$length > 60} { - append line " \\
[string repeat { } 10]" - set length 10 - } if {[llength $p]>1} { lassign $p p default - append line " \[-$p (default \"$default\")\]" - incr length [expr {[string length $p] + [string length $default]* 2 + 4}] + append line $pstart " \[ -$p (default \"$default\") \]" } else { - append line " \[-$p $p\]" - incr length [expr {[string length $p] * 2 + 4}] + append line $pstart " \[ -$p $p \]" } - #set param($p) 1 } - #append result "

Parameter for instances:

[join $pretty {, }]
\n" } + append line "

\n" - return "$line" + return "

$line
" } # @@ -241,10 +240,11 @@ append output [lindex $doc_elements(main) 0] append output "
\n" if { [info exists doc_elements(param)] && [llength $doc_elements(param)] > 0} { - append output "
Documented Parameters:\n" + append output "
Documented Parameters:
\n" foreach par $doc_elements(param) { - append output "
-[lindex $par 0] [lrange $par 1 end]\n" + append output "
-[lindex $par 0]
[lrange $par 1 end]
\n" } + append output "
" } if { [info exists doc_elements(see)] } { append output "
See Also:\n"