ActiveTcl User Guide

xotcl/doc/langRef.xotcl xotcl/doc/langRef.xotcl


Package/File Information

Package provided: XOTcl-langRef 1.3.3
Package required: Tcl

Defined Objects/Classes:
Filename: xotcl/doc/langRef.xotcl

Description: XOTcl language reference. Describes predefined objects and classes.
Predefined primitives: XOTcl contains three predefined primitives:

self computes callstack related information. It can be used in the following ways:

  • self - returns the name of the object, which is currently in execution. If it is called from outside of a proc, it returns the error message ``Can't find self''.
  • self class - the self command with a given argument class returns the name of the class, which holds the currently executing instproc. Note, that this may be different to the class of the current object. If it is called from a proc it returns an empty string.
  • self proc - the self command with a given argument proc returns the name of the currently executing proc or instproc.
  • self callingclass: Returns class name of the class that has called the executing method.
  • self callingobject: Returns object name of the object that has called the executing method.
  • self callingproc: Returns proc name of the method that has called the executing method.
  • self calledclass: Returns class name of the class that holds the target proc (in mixins and filters).
  • self calledproc: Returns method name of the target proc (only applicable in a filter).
  • self next: Return the "next" method on the path as a string.
  • self filterreg: In a filter: returns the name of the object/class on which the filter is registered. Returns either 'objName filter filterName' or 'className instfilter filterName'.
  • self callinglevel: Returns the calling level, from where the actual proc was called from. Intermediary next calls are ignored in this computation. The level is returned in a form it can be used as first argument in uplevel or upvar.
  • self activelevel: Returns the level, from where the actual proc was invoked from. This might be the calling level or a next call, whatsever is higher in the stack. The level is returned in a form it can be used as first argument in uplevel or upvar.

my someMethod is a short form for [self] someMethod and can only be called in a context of an instproc or an method specific proc. It allows certain optimizations and shorter to write.

next executes the "next" method on the precedence order and return with the result.

Date: $Date: 2004/10/30 20:19:55 $


Class: Class

Class: Class
Heritage: Object
Procs/Instprocs: __unknown, alloc, create, info, instdestroy, instfilter, instfilterguard, instforward, instinvar, instmixin, instparametercmd, instproc, new, parameter, parameterclass, recreate, superclass, unknown, volatile.
Description: This meta-class holds the pre-defined methods available for all XOTcl classes.

Instprocs

Procs


Class: Object

Class: Class
Procs/Instprocs: abstract, append, array, autoname, check, class, cleanup, configure, copy, destroy, eval, exists, extractConfigureArg, filter, filterguard, filtersearch, forward, getExitHandler, hasclass, incr, info, instvar, invar, isclass, ismetaclass, ismixin, isobject, istype, lappend, mixin, move, noinit, parametercmd, proc, procsearch, requireNamespace, set, setExitHandler, trace, unset, uplevel, upvar, vwait.
Description: This class holds the pre-defined methods available for all XOTcl objects. All these methods are also available on classes.

Instprocs

Procs



Back to index page.