Index: openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl,v diff -u -r1.28 -r1.29 --- openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 23 Oct 2024 17:08:21 -0000 1.28 +++ openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 25 Oct 2024 12:19:44 -0000 1.29 @@ -33,7 +33,8 @@ # :public object method method_label { -kind:switch proc_spec } { # - # Return a user-friendly label for methods and objects + # Return a user-friendly label for methods and objects. + # @param kind when set, use naming convention from nx, otherwise XOTcl # switch [llength $proc_spec] { 1 {} @@ -167,15 +168,18 @@ return $html } - :public object method method_link {obj kind method} { + :public object method method_link {{-label ""} obj kind method} { # # Return a link for the method if possible. If no proc-doc is # available, return just plain text. # set kind [string trimright $kind s] set proc_index [::xo::api proc_index "" $obj $kind $method] + if {$label eq ""} { + set label $method + } if {[nsv_exists api_proc_doc $proc_index]} { - return "$method" + return "$label" } else { if {[::xo::getObjectProperty $obj $kind $method] eq ""} { return $methodC @@ -258,7 +262,7 @@ } return $object } - + :public object method script_name {-obj scope} { # # Determine name of the current "script" as displayed by "Defined