Index: openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl,v diff -u -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 25 Aug 2013 20:03:54 -0000 1.25.2.1 +++ openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 27 Aug 2013 11:20:39 -0000 1.25.2.2 @@ -22,18 +22,20 @@ {-call_args {}} {-error:boolean} } { - A wrapper for the acs_sc_call procedure, with explicitly named - parameters so it's easier to figure out how to use it. - You must supply either contract and impl, or just impl_id. + A replacement of the former acs_sc_call procedure. + One must supply either contract and impl, or just impl_id. If you supply impl_id and contract, we throw an error if the impl_id's contract doesn't match the contract you passed in. If you supply both impl_id and impl, we throw an error. + + Additional documentation and commentary at http://openacs.org/forums/message-view?message_id=108614. @param contract_name The name of the contract you wish to use. @param operation_name The name of the operation in the contract you wish to call. @param impl The name of the implementation you wish to use. @param impl_id The ID of the implementation you wish to use. @param args The arguments you want to pass to the proc. @param error If specified, will throw an error if the operation isn't implemented. + @author Lars Pind (lars@collaboraid.biz) @see acs_sc_call @@ -137,7 +139,7 @@ {impl_alias {}} {impl_pl {}} } { - Builds the proc used by acs_sc_call, generally only called + Builds the proc used by acs_sc::invoke, generally only called in acs-service-contract-init.tcl at startup. @return 0 on failure, 1 on success. @@ -163,7 +165,7 @@ return 0 } - append docblock "\nacs-service-contract operation. Call via acs_sc_call.\n\n$operation_desc\n\n" + append docblock "\nacs-service-contract operation. Call via acs_sc::invoke.\n\n$operation_desc\n\n" db_foreach operation_inputtype_element {*SQL*} { lappend arguments "$element_name" @@ -180,7 +182,7 @@ } } - append docblock "\n@see $impl_alias\n@see acs_sc_call" + append docblock "\n@see $impl_alias\n@see acs_sc::invoke" set full_statement [acs_sc_get_statement $impl_alias $impl_pl $arguments]