%3 ::xo::Attribute ::xo::Attribute init ::xotcl::Attribute ::xotcl::Attribute __object_configureparameter createForwarder defineIncrementalOperations exists init istype multivalued needsForwarder setterRedefinedOptions ::xo::Attribute->::xotcl::Attribute ::nx::VariableSlot ::nx::VariableSlot ::xotcl::Attribute->::nx::VariableSlot ::xo::db::Attribute ::xo::db::Attribute attribute_reference column_spec create_attribute db_attribute_defined init ::xo::db::Attribute->::xo::Attribute ::xo::db::CrAttribute ::xo::db::CrAttribute create_attribute ::xo::db::CrAttribute->::xo::db::Attribute

Class ::xo::Attribute

::xo::Attribute[i] create ... \
           [ -constraint_values constraint_values ] \
           [ -datatype:substdefault (default "text") ] \
           [ -help_text help_text ] \
           [ -multivalued multivalued ] \
           [ -pretty_name pretty_name ] \
           [ -pretty_plural:substdefault (default "") ] \
           [ -required:substdefault (default "false") ] \
           [ -spec spec ] \
           [ -substdefault substdefault ] \
           [ -validator validator ]

OpenACS specific attribute slot class, which can be further refined. Contains meta data based on the OpenACS meta-data conventions.
Defined in packages/xotcl-core/tcl/01-debug-procs.tcl

Class Relations

  • class: ::xotcl::MetaSlot[i]
  • superclass: ::xotcl::Attribute[i]
  • subclass: ::xo::db::Attribute[i]
::xotcl::MetaSlot create ::xo::Attribute \
     -superclass ::xotcl::Attribute

Methods (to be applied on instances)

  • constraint_values (setter)

  • datatype (setter)

  • help_text (setter)

  • init (scripted, public)

     <instance of xo::Attribute[i]> init

    Constructor of the OpenACS specific attribute slot class

    Testcases:
    No testcase defined.
    next
    # provide a default pretty name for the attribute based on message keys
    if {![info exists :pretty_name]} {
      set object_type ${:domain}
      if {[regexp {^::([^:]+)::} $object_type _ head]} {
        set tail [namespace tail $object_type]
        set :pretty_name "#$head.$tail-${:name}#"
        #:log "--created pretty_name = ${:pretty_name}"
      } else {
        error "Cannot determine automatically message key for pretty name.  Use namespaces for classes"
      }
    }
  • instvar (alias)

  • pretty_name (setter)

  • pretty_plural (setter)

  • required (setter)

  • spec (setter)

  • validator (setter)