Index: xotcl/ChangeLog =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/ChangeLog (.../ChangeLog) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/ChangeLog (.../ChangeLog) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -1,3 +1,12 @@ +2006-09-29 , Uwe Zdun + * Release of XOTcl 1.5.2 + +2006-09-28 + * Extended regression test for nested contains + * fix potential bug in copy-command with c-level client data + (don't copy commands with client data for the time being, rely on + introspection) + 2006-09-27 * Fixed memory corruption (accessing feed memory) in the invalidation of transitive mixins (many thanks to Don Porter for @@ -8,6 +17,10 @@ * package xotcl::trace: allow to trace objects with "Trace add trace " not only classes as before (many thanks to jima for suggesting this) + * fix for nested -contains with new (many thanks to Stefan + Sobernig for pointing this out) + * Added a target test-nohttp for automated regression tests + on machines with firewalls (used for FreeBSD build system) 2006-09-26 * xotcl.c: improved portability for 64bit AMD on FreeBSD (and Index: xotcl/Makefile =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/Makefile (.../Makefile) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/Makefile (.../Makefile) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -12,14 +12,14 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile,v 1.40 2006/09/27 08:12:39 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.41 2006/10/04 20:40:23 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== -#XOTCL_VERSION = 1.5.2 +#XOTCL_VERSION = 1.5.3 XOTCL_VERSION = 1.5 src_lib_dir = ${srcdir}/library @@ -98,8 +98,8 @@ # configuration options) composed of the named objects. #======================================================================== -PKG_LIB_FILE = libxotcl1.5.2.dylib -PKG_STUB_LIB_FILE = libxotclstub1.5.2.a +PKG_LIB_FILE = libxotcl1.5.3.dylib +PKG_STUB_LIB_FILE = libxotclstub1.5.3.a lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) BINARIES = $(lib_BINARIES) @@ -126,7 +126,7 @@ INSTALL_SCRIPT = ${INSTALL} PACKAGE_NAME = xotcl -PACKAGE_VERSION = 1.5.2 +PACKAGE_VERSION = 1.5.3 CC = gcc -pipe CFLAGS_DEFAULT = -Os CFLAGS_WARNING = -Wall -Wno-implicit-int @@ -153,10 +153,12 @@ # Not used, but retained for reference of what libs Tcl required TCL_LIBS = ${DL_LIBS} ${LIBS} ${MATH_LIBS} -pkgdatadir = /usr/local/share/xotcl1.5.2 -pkglibdir = /usr/local/lib/xotcl1.5.2 -pkgincludedir = /usr/local/include/xotcl1.5.2 +pkgdatadir = /usr/local/share/xotcl1.5.3 +pkglibdir = /usr/local/lib/xotcl1.5.3 +pkgincludedir = /usr/local/include/xotcl1.5.3 +# XOTCLSH = xotclsh + #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our # package without installing. The other environment variables allow us @@ -174,15 +176,15 @@ SHARED_BUILD = 1 INCLUDES = -I"/Users/neumann/src/tcl8.4.12/generic" -I"/Users/neumann/src/tcl8.4.12/unix" -I./generic -EXTRA_CFLAGS = -DXOTCLVERSION=\"1.5\" -DXOTCLPATCHLEVEL=\".2\" -DHAVE_TCL_COMPILE_H=1 +EXTRA_CFLAGS = -DXOTCLVERSION=\"1.5\" -DXOTCLPATCHLEVEL=\".3\" -DHAVE_TCL_COMPILE_H=1 # TCL_DEFS is not strictly need here, but if you remove it, then you # must make sure that configure.in checks for the necessary components # that your library may use. TCL_DEFS can actually be a problem if # you do not compile with a similar machine setup as the Tcl core was # compiled with. -#DEFS = $(TCL_DEFS) -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.2\" -DPACKAGE_STRING=\"xotcl\ 1.5.2\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) -DEFS = -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.2\" -DPACKAGE_STRING=\"xotcl\ 1.5.2\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) +#DEFS = $(TCL_DEFS) -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.3\" -DPACKAGE_STRING=\"xotcl\ 1.5.3\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) +DEFS = -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.3\" -DPACKAGE_STRING=\"xotcl\ 1.5.3\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) CONFIG_CLEAN_FILES = Makefile xotclConfig.sh apps/utils/xotclsh apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix autom4te.cache/ @@ -204,7 +206,7 @@ # for the BINARIES that you specified above have already been done. #======================================================================== -all: binaries libraries doc +all: binaries libraries doc end #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix @@ -325,7 +327,8 @@ gdb: $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) -test: binaries libraries test-core +test: binaries libraries test-core test-http +test-nohttp: binaries libraries test-core #TESTFLAGS = -srcdir $(srcdir) test-core: $(TCLSH_PROG) @@ -339,8 +342,11 @@ -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/slottest.xotcl \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-http: $(TCLSH_PROG) $(TCLSH) $(src_test_dir_native)/xocomm.test \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) + test-actiweb: $(TCLSH_PROG) $(TCLSH) $(src_test_dir_native)/actiweb.test \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) @@ -625,7 +631,7 @@ echo " or" ; \ echo " put the 'package require' line into your ~/.tclshrc" ; \ else \ - echo " xotclsh" ; \ + echo " ./xotclsh" ; \ fi @echo "************************************************************" Index: xotcl/Makefile.in =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/Makefile.in (.../Makefile.in) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/Makefile.in (.../Makefile.in) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.20 2006/09/27 08:12:39 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.21 2006/10/04 20:40:23 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -157,6 +157,8 @@ pkglibdir = @pkglibdir@ pkgincludedir = @pkgincludedir@ +# XOTCLSH = @XOTCLSH@ + #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our # package without installing. The other environment variables allow us @@ -204,7 +206,7 @@ # for the BINARIES that you specified above have already been done. #======================================================================== -all: binaries libraries doc +all: binaries libraries doc end #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix @@ -325,7 +327,8 @@ gdb: $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) -test: binaries libraries test-core @test_actiweb@ +test: binaries libraries test-core test-http @test_actiweb@ +test-nohttp: binaries libraries test-core #TESTFLAGS = -srcdir $(srcdir) test-core: $(TCLSH_PROG) @@ -339,8 +342,11 @@ -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/slottest.xotcl \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-http: $(TCLSH_PROG) $(TCLSH) $(src_test_dir_native)/xocomm.test \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) + test-actiweb: $(TCLSH_PROG) $(TCLSH) $(src_test_dir_native)/actiweb.test \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) @@ -625,7 +631,7 @@ echo " or" ; \ echo " put the 'package require' line into your ~/.tclshrc" ; \ else \ - echo " xotclsh" ; \ + echo " ./xotclsh" ; \ fi @echo "************************************************************" Index: xotcl/config/mktar.sh =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/config/mktar.sh (.../mktar.sh) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/config/mktar.sh (.../mktar.sh) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -9,5 +9,6 @@ tar zcvf ./$name.tar.gz \ `find ./$name -type f -o -type l| fgrep -v CVS | fgrep -v SCCS | \ fgrep -v Attic | fgrep -v "autom4te"| fgrep -v "~"|fgrep -v .db | \ - fgrep -v .junk | fgrep -v "#" |fgrep -v .DS_Store| fgrep -v config.` + fgrep -v .junk | fgrep -v "#" |fgrep -v .DS_Store| fgrep -v config. | \ + fgrep -v .gdb` Index: xotcl/configure =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/configure (.../configure) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/configure (.../configure) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xotcl 1.5.2. +# Generated by GNU Autoconf 2.59 for xotcl 1.5.3. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -267,8 +267,8 @@ # Identity of this package. PACKAGE_NAME='xotcl' PACKAGE_TARNAME='xotcl' -PACKAGE_VERSION='1.5.2' -PACKAGE_STRING='xotcl 1.5.2' +PACKAGE_VERSION='1.5.3' +PACKAGE_STRING='xotcl 1.5.3' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -777,7 +777,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xotcl 1.5.2 to adapt to many kinds of systems. +\`configure' configures xotcl 1.5.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -834,7 +834,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xotcl 1.5.2:";; + short | recursive ) echo "Configuration of xotcl 1.5.3:";; esac cat <<\_ACEOF @@ -979,7 +979,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xotcl configure 1.5.2 +xotcl configure 1.5.3 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -993,7 +993,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xotcl $as_me 1.5.2, which was +It was created by xotcl $as_me 1.5.3, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1572,7 +1572,7 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 XOTCL_MINOR_VERSION=5 -XOTCL_RELEASE_LEVEL=.2 +XOTCL_RELEASE_LEVEL=.3 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -10570,7 +10570,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by xotcl $as_me 1.5.2, which was +This file was extended by xotcl $as_me 1.5.3, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10625,7 +10625,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xotcl config.status 1.5.2 +xotcl config.status 1.5.3 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -11239,3 +11239,5 @@ + + Index: xotcl/configure.in =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/configure.in (.../configure.in) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/configure.in (.../configure.in) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -11,7 +11,7 @@ # for this package, and can be a relative path, such as: # #-------------------------------------------------------------------- -define(XOTclVersion, 1.5.2) +define(XOTclVersion, 1.5.3) AC_INIT([xotcl], [XOTclVersion]) #-------------------------------------------------------------------- @@ -104,7 +104,7 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 XOTCL_MINOR_VERSION=5 -XOTCL_RELEASE_LEVEL=.2 +XOTCL_RELEASE_LEVEL=.3 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -472,3 +472,5 @@ + + Index: xotcl/doc/langRef-xotcl.pdf =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 Binary files differ Index: xotcl/doc/langRef.xotcl =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -1,5 +1,5 @@ -# $Id: langRef.xotcl,v 1.13 2006/09/27 08:12:40 neumann Exp $ -package provide XOTcl-langRef 1.5.0 +# $Id: langRef.xotcl,v 1.14 2006/10/04 20:40:23 neumann Exp $ +package provide XOTcl-langRef 1.5.2 package require XOTcl @ @File { @@ -81,9 +81,10 @@ of using "<@tt>[list [self] methodName ...]".

-

<@tt>::xotcl::alias class|obj ?-objscope? ?-per-object? cmdName
-
can be used to register predefined C-implemented Tcl commands as - methods. The option <@tt>-objscope has the same meaning as for forwarder +
<@tt>::xotcl::alias class|obj methodName ?-objscope? ?-per-object? cmdName
+
can be used to register a predefined C-implemented Tcl command as + method <@tt>methodName. + The option <@tt>-objscope has the same meaning as for forwarder (instance variables of the calling object appear in the local scope of the Tcl command), <@tt>-per-object has the same meaning as for the method <@tt>method (when used on a class, the method is registered for the @@ -123,7 +124,7 @@ } - date { $Date: 2006/09/27 08:12:40 $ } + date { $Date: 2006/10/04 20:40:23 $ } } ## @@ -229,7 +230,7 @@ } { Description { Resets an object or class into an initial state, as after construction. - Called during recreation process by the method 'recreate' + Called during recreation process by the method recreate. } return "empty string" } @@ -238,11 +239,18 @@ ?args? "'-' method calls" } { Description { - Calls the '-' (dash) methods. I.e. evaluates arguments and calls - everything starting with '-' (and not having a digit a - second char) as a method. Every list element until the next '-' - is interpreted as a method argument. configure/tt> is called - before the constructor during initialization and recreation. + Calls the '-' (dash) methods. This method evaluates its argument list + and calls everything starting with '-' (followed by an alpha character) + as a method. Every list element until the next '-' is interpreted as an + argument of the called method. XOTcl supports argument lists with a variable + number of arguments. If an argument of a method called this way starts + with a "-", the call can be placed safely + into a list (e.g. "Class c [-strangearg -a-] -simplearg 2") to avoid + the interpretation of "a-" as a method. +

The method configure is called automatically by + the default create and recreate methods after + the default values are set.

+

In the following example, the variable set is called via configure before init: <@pre class='code'> Object o -set x 4 @@ -469,7 +477,19 @@ return "1 or 0" } +@ Object instproc init { + args "argument list" +} { + Description { + The method <@tt>init is called automatically by the default + <@tt>create method on initialized + objects (the default variables are set, the configure + methods are already performed). This method is solely a user hook for + applications to perform class specific initialzation after object creation. + } +} + @ Object instproc incr { varName "variable name" ?increment? "value to increment" @@ -911,18 +931,18 @@ } @ Class instproc alloc { obj "new obj/class name" - ?args? "arguments passed to the new class after creation" + ?args? "arguments passed during creation" } { description { - Allocate memory for a new XOTcl object or class. <@tt>create<@/tt> uses - <@tt>alloc to allocate memory. But <@tt>create<@/tt> also - calls init and evaluates '-' arguments as method calls. - In seldom cases the programmer may want to suppress the - <@tt>create<@/tt> - mechanism and just allocate memory. Then <@tt>alloc can - be used. + Allocate (create) an uninitialized object or class. Typically, alloc + is called automatically by <@tt>create<@/tt> + to allocate an uninitialized object or class. + In contrast to alloc, <@tt>create<@/tt> also + initializes and configures the object. + The method alloc can be used by a programmer who may want to + create uninitialized objects/classes. } - return "new class name" + return "fully qualified name of created instance" } @ Class instproc allinstances { @@ -940,24 +960,25 @@ description { Create user-defined classes or objects. If the class is a meta-class, a class is created, otherwise an object. + The object creation protocol implemened by create works as follows: +

    +
  • create firstly calls <@tt>alloc + in order to create an uninitialized object or class. +
  • In the second step, the + default values for parameters are searched on superclasses and set in the created object. +
  • In the third step, the method <@tt>configure + is called with the passed + argument list to configure the object/class. +
  • Finally the constructor <@tt>init is called on the object + with all arguments up to the first '-' argument (as returned by configure). +
- Create firstly calls <@tt>alloc in order to allocate memory for the - new object. Then default values for parameters are searched on - superclasses (an set if found). Then <@tt>args is searched for args - starting with '-' followed by an alpha character. These arguments - are called as methods. '-' followed by a numerical is interpreted - as a negative number (and not as a method). If a value of a method - called this way starts with a "a", the call can be placed safely - into a list (e.g. "Class c [-strangearg -a-] -simplearg 2"). +

In the default XOTcl definition, the <@tt>create method + is called implicitly by the <@tt>unknown method of the metaclass + Class, when a class (meta-class) is called with an unknown + method. E.g. the following two commands are equivalent - Finally the constructor <@tt>init is called on the object - with all arguments up to the first '-' arg.<@p> - - The <@tt>create method is called implicitly through the - <@tt>unknown - mechanism when a class (meta-class) is called with an unknown - method. E.g. the following two commands are equivalent - <@pre class='code'> Car herby -color red Car create herby -color red <@/pre> @@ -970,8 +991,9 @@ <@pre class='code'> Class Car -init -superclass Vehicle <@/pre> + See also: <@tt>recreate } - return "name of the created instance (result of alloc)" + return "fully qualified name of the created instance (result of alloc)" } @ Class instproc info { @@ -1215,7 +1237,7 @@ @ Class instproc instproc { name "instance method name" - ?non-pos-args?" "optional non-positional arguments" + "?non-pos-args?" "optional non-positional arguments" args "instance method arguments" body "instance method body" "?preAssertion?" "optional assertions that must hold before the proc executes" @@ -1247,7 +1269,7 @@ If <@tt>-childof obj is specified, the new object is created as a child of the specified object. } - return "new object name" + return "fully qualified name of the created instance" } @ Class instproc parameter { @@ -1306,13 +1328,28 @@ ?args? "arbitrary arguments" } { description { - Hook called upon recreation of an object. Performs standard object - initialization, per default. May be overloaded/-written. It calls - another method cleanup which handles actual cleanup of the object - during next. That means, if you overload recreate, in the pre-part - the object still contains its old state, after next it is cleaned up. + Hook called upon recreation of an object in cases where the user wants to distinguish + between creation and recreation of objects. A recreation occurs, when an Object is created + with a name that exists already. + A typical use-case is the redefinition + of classes in and IDE, where the relations between classes/classes and object/classes + should be preserved (this is different to a destroy of the object). + +

The method recreate does not need to call alloc + but calls instead cleanup + to reset to the object (or class) to its initial state (e.g. remove variables, child objects, + for classes remove instaces, etc.). Then it performs the standard initialization + for the object or class. + +

If recreate is overloaded and the default recreate method is called via next, + the pre-part + (before next) contains its old state of the object, while during the part after next the + object is cleaned up. +

To ease recreation of classes, see configure softrecreate. + + See also: <@tt>create } - return "obj name" + return "fully qualified name of instance" } @ Class instproc superclass { Index: xotcl/doc/tutorial.html =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/doc/tutorial.html (.../tutorial.html) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/doc/tutorial.html (.../tutorial.html) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -1,10 +1,10 @@ - + XOTcl - Tutorial - +