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.68 -r1.69 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 3 Nov 2018 19:39:39 -0000 1.68 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 17 Nov 2018 16:30:40 -0000 1.69 @@ -386,7 +386,16 @@ if { $format ne "text/html" && $format ne "text/plain" } { return -code error "Only text/html and text/plain documentation are currently supported" } - array set doc_elements {flags "" default_values "" switches "" positionals "" varargs_p 0 script "" deprecated_p 0 main ""} + array set doc_elements { + flags "" + default_values "" + switches "" + positionals "" + varargs_p 0 + script "" + deprecated_p 0 + main "" + } array set doc_elements [nsv_get api_proc_doc $proc_name] array set flags $doc_elements(flags) array set default_values $doc_elements(default_values) @@ -1163,11 +1172,16 @@ if {[info commands ::xo::api] ne "" && [regexp {^(.*) (inst)?proc (.*)$} $proc_name match obj prefix method]} { - if {[regexp {^(.*) (.*)$} $obj match thread obj]} { - return [::xo::api get_method_source $thread $obj $prefix $method] + if {[regexp {^(.*) (.*)$} $obj match scope obj]} { + if {[:xo::api scope_eval $scope ::nsf::is object $obj]} { + [::xo::api get_method_source $scope $obj $prefix $method] + } } else { - return [::xo::api get_method_source "" $obj $prefix $method] + if {[::nsf::is object $obj]} { + return [::xo::api get_method_source "" $obj $prefix $method] + } } + return "" } elseif {[info commands ::xo::api] ne "" && [regexp {^([^ ]+) (Class|Object) (.*)$} $proc_name . thread kind obj]} { return [::xo::api get_object_source $thread $obj]