xo::api proc method_link (public)
xo::api method_link [ -label label ] obj kind method
Defined in packages/xotcl-core/tcl/01-debug-procs.tcl
Return a link for the method if possible. If no proc-doc is available, return just plain text.
- Switches:
- -label (optional)
- Parameters:
- obj (required)
- kind (required)
- method (required)
- Testcases:
- No testcase defined.
Source code: # # 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 "<a href='/api-doc/proc-view?proc=[ns_urlencode $proc_index]'>$label</a>" } else { if {[::apidoc::get_object_property $obj $kind $method] eq ""} { # # Try to handle aliases via the alias definition # set definition [ns_cache info {*}[expr {$kind eq "proc" ? "object" : ""}] method definition $method] if {[lindex $definition end-2] eq "alias"} { return "<a href='/api-doc/proc-view?proc=[ns_urlencode [lindex $definition end]]'>$label</a>" } # # Must be something implemented in C # return $method<SUP>C</SUP> } else { return $method } }XQL Not present: Generic, PostgreSQL, Oracle