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.20 -r1.21 --- openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 17 Nov 2018 16:16:50 -0000 1.20 +++ openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 17 Nov 2018 16:22:38 -0000 1.21 @@ -250,9 +250,13 @@ } :public object method object_url {{-show_source 0} {-show_methods 1} scope obj} { - #set object [:scope_eval $scope nsf::object::qualify $obj] - set object [:scope_eval $scope namespace origin $obj] - return [export_vars -base /xotcl/show-object {object show_source show_methods}] + set isObject [:scope_eval $scope ::nsf::is object $obj] + if {$isObject} { + set object [:scope_eval $scope namespace origin $obj] + return [export_vars -base /xotcl/show-object {object show_source show_methods}] + } else { + return . + } } :public object method object_index {scope obj} { 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]