Index: openacs-4/packages/acs-api-browser/acs-api-browser.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/acs-api-browser.info,v diff -u -r1.41 -r1.42 --- openacs-4/packages/acs-api-browser/acs-api-browser.info 3 Sep 2024 15:37:29 -0000 1.41 +++ openacs-4/packages/acs-api-browser/acs-api-browser.info 25 Oct 2024 12:19:44 -0000 1.42 @@ -7,7 +7,7 @@ t t - + OpenACS Interactive documentation for the Tcl and SQL APIs. 2024-09-02 @@ -17,7 +17,7 @@ 3 On line interactive documentation for the locally installed Tcl and SQL APIs. Links to the Tcl core and NaviServer/AOLServer online documentation as well. - + Index: openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl,v diff -u -r1.80 -r1.81 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 22 Oct 2024 13:44:14 -0000 1.80 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 25 Oct 2024 12:19:44 -0000 1.81 @@ -5,7 +5,6 @@ @author Jon Salz (jsalz@mit.edu) @author Lars Pind (lars@arsdigita.com) @creation-date 21 Jun 2000 - @cvs-id $Id$ } @@ -651,10 +650,33 @@ svg g g polygon {fill: #f4f4e4;} } - set callgraph [util::inline_svg_from_dot -css $css \ - [api_call_graph_snippet -proc_name $proc_name -maxnodes 5]] - if {$callgraph ne ""} { - append blocks_out "

Partial Call Graph (max 5 caller/called nodes):
$callgraph
\n" + if {![regexp { (Class|Object) } $proc_name]} { + if {![regexp { (inst)?proc } $proc_name]} { + #ns_log notice "Compute call graph from <$proc_name>" + set callgraph [util::inline_svg_from_dot -css $css \ + [api_call_graph_snippet -proc_name $proc_name] -maxnodes 5] + if {$callgraph ne ""} { + append blocks_out "

Partial Call Graph (max 5 caller/called nodes):
$callgraph
\n" + } + } + } else { + set objName [::xo::api object_from_proc_index $proc_name] + if {[nsf::is object,type=::nx::Object $objName] && ![nsf::is object,type=::nx::Class $objName]} { + append blocks_out
    + foreach m [$objName info lookup methods -callprotection public -source application] { + set methodSyntax "$objName $m [$objName info lookup syntax $m]" + set definition [nx::Object info method definition [$objName info lookup method $m]] + set containerObject [lindex $definition 0] + if {$containerObject ne $objName} { + # + # The method is defined on a class + # + set methodSyntax [xo::api method_link -label $methodSyntax $containerObject instproc $m] + } + append blocks_out "
  • $methodSyntax
  • \n" + } + append blocks_out
+ } } append blocks_out "

Testcases:
\n" Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -r1.108 -r1.109 --- openacs-4/packages/xotcl-core/xotcl-core.info 16 Oct 2024 09:21:22 -0000 1.108 +++ openacs-4/packages/xotcl-core/xotcl-core.info 25 Oct 2024 12:19:44 -0000 1.109 @@ -10,7 +10,7 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) 2024-09-02 @@ -42,11 +42,11 @@ BSD-Style 2 - + - + 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