template::list::get_reference (public)
template::list::get_reference -name name [ -local_name local_name ] \ [ -create ]
Defined in packages/acs-templating/tcl/list-procs.tcl
Bind an upvar reference to a variable at the template parse level to a local variable, optionally giving an error message if it doesn't exist.
- Switches:
- -name (required)
- Name of the variable at the template parse level.
- -local_name (optional, defaults to
"list_properties"
)- Name of the local variable to bind the reference to, default "list_properties".
- -create (optional, boolean)
- Boolean which if true suppresses the "not found" error return, for instance when you're building the reference in order to create a new list.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$name eq ""} { error "Attempt to get reference to an empty name." } set refname [get_refname -name $name] if { !$create_p && ![uplevel \#[template::adp_level] [list info exists $refname]] } { error "List '$name' not found" } uplevel upvar #[template::adp_level] $refname $local_nameXQL Not present: Generic, PostgreSQL, Oracle