Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xotcl::Class[i] ::xo::Context

Class Hierarchy of ::xo::Context

  • ::xotcl::Object[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xo::Context[i]
      Parameter for instances:
      actual_query (default " "), locale, package_id (default "0"), parameter_declaration (default "")
      Methods for instances:
      exists_query_parameter, export_vars, get_all_query_parameter, get_parameters, initialize, original_url_and_query, process_query_parameter, query_parameter
      Methods to be applied on the class:
      Methods provided by the meta-class
This class provides a context for evaluation, somewhat similar to an activation record in programming languages. It combines the parameter declaration (e.g. of a page, an includelet) with the actual parameters (specified in an includelet) and the provided query values (from the url). The parameter decaration are actually XOTcl's non positional arguments.
Defined in packages/xotcl-core/tcl/context-procs.tcl

Class Relations

  • superclass: ::xotcl::Object[i]
  • subclass: ::xo::ConnectionContext[i], ::xowiki::Includelet[i]
::xotcl::Class create ::xo::Context \
     -superclass ::xotcl::Object \
     -parameter {{actual_query " "} locale {package_id 0} {parameter_declaration ""}}


  • instproc export_vars (public)

    <instance of ::xo::Context[i]> export_vars [ -level level ]
    Export the query variables

    -level (defaults to "1") (optional)
    target level
    ::622873 instproc export_vars {{-level 1}} {
        my instvar queryparm package_id
        foreach p [my array names queryparm] {
          regsub -all : $p _ varName
          uplevel $level [list set $varName [my set queryparm($p)]]
        uplevel $level [list set package_id $package_id]
  • instproc get_parameters (public)

    <instance of ::xo::Context[i]> get_parameters
    Convenience routine for includelets. It combines the actual parameters from the call in the page (highest priority) wit the values from the url (second priority) and the default values from the signature

    ::622873 instproc get_parameters {} {
        set source [expr {[my exists __caller_parameters] ? 
                          [self] : [my info parent]}]
        $source instvar __caller_parameters
        if {![my exists __including_page]} {
          # a includelet is called from the toplevel. the actual_query might
          # be cached, so we reset it here.
          my actual_query [::xo::cc actual_query]
        if {[info exists __caller_parameters]} {
          my process_query_parameter -all_from_query false -caller_parameters $__caller_parameters
        } else {
          my process_query_parameter -all_from_query false
        my export_vars -level 2 

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]