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


Package/File Information

No package provided/required

Defined Objects/Classes:
Filename: ./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 isnextcall: Return 1 if this method was invoked via next, otherwise 0
  • self next: Return the "next" method on the precedence 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 invokes the next shadowed (same-named) method on the precedence path and returns its result. If next is called without arguments, the arguments of the current method are passed through the called method. If next is invoked with the flag --noArgs, the shadowed method is called without arguments. If other arguments are specified for next, these will be used for the call.

::xotcl::configure filter on|off allows to turn on or off filters globally for the current interpreter. By default, the filter state is turned off. This function returns the old filter state. This function is needed for the serializer that is intended to serialize the objects classes independent of filter settings.

Date: $Date: 2005/09/09 21:09:01 $


Class: Class

Class: Class
Heritage: Object
Procs/Instprocs: __unknown, allinstances, 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.