Index: openacs.org-dev/packages/acs-api-browser/www/proc-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/acs-api-browser/www/proc-view.tcl,v diff -u -r1.1.1.1 -r1.1.1.2 --- openacs.org-dev/packages/acs-api-browser/www/proc-view.tcl 9 Jul 2002 17:34:56 -0000 1.1.1.1 +++ openacs.org-dev/packages/acs-api-browser/www/proc-view.tcl 8 Oct 2002 15:46:41 -0000 1.1.1.2 @@ -7,7 +7,7 @@ source_p:optional,integer,trim } -properties { title:onevalue - context_bar:onevalue + context:onevalue source_p:onevalue default_source_p:onevalue return_url:onevalue @@ -16,7 +16,7 @@ } set title $proc -set context_bar [ad_context_bar $proc] +set context [list $proc] set default_source_p [ad_get_client_property -default 0 acs-api-browser api_doc_source_p] set return_url [ns_urlencode [ad_conn url]?[export_url_vars proc]] @@ -26,8 +26,18 @@ set source_p $default_source_p } +# Try and be helpful about the procedure. if { ![nsv_exists api_proc_doc $proc] } { - set error_msg "This proc is not defined with ad_proc or proc_doc" + if {![empty_string_p [namespace eval :: [list info procs $proc]]]} { + set error_msg "

This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.

The procedure is defined as:

+proc $proc {[info args $proc]} {
+[ad_quotehtml [info body $proc]]
+}

" + } elseif {![empty_string_p [namespace eval :: [list info commands $proc]]]} { + set error_msg "

The procedure $proc is an available command on the server and might be found in the TCL or AOLServer documentation or in documentation for a loadable module (like ns_cache for example).

" + } else { + set error_msg "

The procedure $proc is not defined in the server.

" + } } else { if { $source_p } {