Index: xotcl/ChangeLog =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/ChangeLog (.../ChangeLog) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/ChangeLog (.../ChangeLog) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,3 +1,203 @@ +2006-09-27 + * Fixed memory corruption (accessing feed memory) in the + invalidation of transitive mixins (many thanks to Don Porter for + reporting it and providing suggestions, how to trigger the bug + via Tcl memory debug) + * Removed c++ style comments (many thanks to Andreas Kupries for + reporting) + * package xotcl::trace: allow to trace objects with "Trace add + trace " not only classes as before (many thanks to jima for + suggesting this) + +2006-09-26 + * xotcl.c: improved portability for 64bit AMD on FreeBSD (and + maybe on other 64bit platforms as well) all vararg lists are now + terminated by ..., (char *) NULL Previously, some were + terminated by an integer typed zero-value, which can lead to + problems when sizeof(int) != sizeof(char *) + * The vararg interface is used by the following API calls in the + XOTcl code: Tcl_AppendResult(), Tcl_AppendStringsToObj(), + Tcl_VarEval(), XOTclVarErrMsg(). all occurrences are fixed. + * All occurrences of Tcl_AppendResult() removed form xotcl.c + +2006-09-24 + * xotcl.c: make sure, that no + Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); + happens on shared objects. + +2006-09-22 , Uwe Zdun + * Release of XOTcl 1.5.1 + +2006-09-22 + * XOTclNextCmd() exported to external (stub) interface, to allow + applications to call next without going through a Tcl_Eval() + (Many thanks to Scott Gargash for the constructive discussions) + * removed XOTclGetSelfObj() again from the external interface + since the object/class is passed anyhow. + * some minor cleanups and additions to tutorial. + * added small fix mentioned in c.l.t for a more backwards + compatible old parameter interface. + +2006-09-21 + * Changed interface of XOTclCallMethodWithArgs to contain the + specified number of elements in objv[] rather than the absolute + number. Changed name from XOTclCallMethodWithArg to + XOTclCallMethodWithArgs + * Added XOTclCallMethodWithArgs() to he external interface to + allow C applications faster invocation of XOTcl methods + * Simplified and standardized calling conventions for + C-implemented methods. ClientData receives always the + XOTcl_Object, no matter, what client data was specified during + registration (e.g. XOTCL_NONLEAF_METHOD). Users + can rely on using ClientData for Objects + * Some performance improvements in invocation of XOTcl methods + +2006-09-20 + * added XOTclGetSelfObj() to he external interface to obtain the + current object from a C application from the callstack + * fixed genstubs target in Makefile.in regenerated all stub files + * removed a few more compiler warnings for the power64 bit + architecture + +2006-09-19 + * added XOTCL_NONLEAF_METHOD: This constant + must be used fwhen registering C-implemented methods + that call "::xotcl::next" to push the XOTcl activation record. + + Example: + XOTclAddIMethod( interp, MyClass, "mymethod", MyMethod, + XOTCL_NONLEAF_METHOD, 0 ); + +2006-09-18 + * fixed a bug in parsing nonpositional arguments, when + e.g. square brackets are used in type declarations for + parameters. + Class C + C instproc foo {{-q:mult[2],optional 1} -x:boolean,optional args} {puts hu} + Tcl lists add another layer of braces + ... foo {{{-q:mult[2],optional} 1} -x:boolean,optional args} .... + which have to be removed at the definition time of the parameters. + * fixed a 64-bit problem for POWER5+ machines + * fixed serializer to handle deeper stratification layers + * fixed an autoname crash under NT + (Many thanks to Mark Jannsen for the patch) + +2006-09-17 + * fixed a bug in deprecated part, when -setter is used in parameter + options. + +2006-09-15 + * Changed "test -e" to "test -f" in Makefile.in, since + the standard test command in Solaris does not understand "test -e" + (Many thanks to Andreas Kupries for reporting) + +2006-09-14 , Uwe Zdun + * Release of XOTcl 1.5.0 + +2006-09-13 Uwe Zdun + * Update of build files for windows + +2006-09-10 + * added method "contains" to create objects aggregated into + other objects (essentially a value added back-port of the OpenACS + version). + * based method "slots" on method "contains" for improved orthogonality + * rearranging sections in the tutorial + * deleted obsolete sections from the tutorial + * serializer: when an object is defined as exported, export the whole + object tree (no need to specify export of all slots for exported objects) + +2006-09-08 + * added -verbose to forward options + * added subst to the tcl-impored methods + * fixed a bug with .... -slots {Attribute new -name a1} + (Many thanks to neophytos for reporting} + * provide method serialize (for Object), when the serializer package is loaded + +2006-09-07 + * provided Tcl 8.5a4 compatibility + * spellechecking langref, make terminology more consistent + (naming of arguments like .e.g methodName) + +2006-09-04 + * update of tcl.m4 for newest TEA from CVS + +2006-09-03 + * "mixin|filter|instmixin|instfilter set ..." deprecated, use + "mixin|filter|instmixin|instfilter assign ..." instead + +2006-09-01 + * fixed a bug in the xotcl trace module (many thanks to jima for reporting) + * extended procsearch to report parametercmd and instparametercmd + +2006-08-30 + * extended procsearch to report as well [inst]parametercmd + +2006-08-26 + * extended procsearch to report as well [inst]forward and [inst]cmd + +2006-08-25 + * new subcommand "info slots" + * implemented backwards bug-compatible "info parameter", deprecated + +2006-08-23 + * added system slots and attribute slots (see documentation) + +2006-08-21 + * changed the implementation of the configure command + and setrelation command to use Tcl_GetIndexFromObj(); + * added the subcommand "class" and "superclass" to the + the setrelation command. + +2006-08-22 + * fixed a bug with nonpositional arguments, some + positional arguments and "args" + * fixed a bug in nonpositional arguments when called without + arguments + * improved error messages in connection with nonpositional arguments + * extended interface of XOTclErrBadVal() to provide better error messages + (this changes the stub interface, so we have to change the version number) + +2006-08-21 + * new command for registering predefined C-implemented Tcl commands + as methods + ::xotcl::alias | \ + ?-objscope? ?-per-object? + "-objscope" has the same meaning as for forwarder, + "-per-object" has the same meaning as for the method "method", + This command is somewhat similar to "[inst]forward -earlybinding", + but can be used to bootstrap xotcl (when e.g. no methods are + available). + +2006-07-20 + * Documentation bug: method volatile was documented + as a method of class, but is documented as a method of object + (Many thanks to Kristoffer for reporting) + +2006-05-22 + * package.xotcl: evaluating calls to "tcl_package" in the + global namespace instead of the current. This fixes problem of + xotcl 1.4.* with xotclide. Many thanks to + Bill Paulsen and Artur Trzewik for identifying the problem and + suggesting a fix. + +2006-04-20 + * xotcl.c: new option for the argument substitution. When the argument + list of the forward command contains "%argclindex {a b c}", then + depending of the number of arguments at invocation "a", "b" + or "c" is substituted. + * New option for forwarder: The option -earlybinding can be used to look + up the function pointer of the called Tcl command at + definition time of the forwarder instead of invocation time. + This option should only be used for calling C-implemented Tcl commands) + +2006-03-22 + * deprecated command filterappend, instfilterappend, mixinappend, + instmixinappend, tclcmd, insttclcmd deleted + +2006-03-20 + * allow single colons in method names (fix in xotcl.c, NSTail()) + 2006-02-17 , Uwe Zdun * release of 1.4.0 Index: xotcl/Makefile =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/Makefile (.../Makefile) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/Makefile (.../Makefile) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -12,24 +12,24 @@ # 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.39 2006/09/25 08:29:03 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.40 2006/09/27 08:12:39 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== -#XOTCL_VERSION = 1.4.0 -XOTCL_VERSION = 1.4 +#XOTCL_VERSION = 1.5.2 +XOTCL_VERSION = 1.5 src_lib_dir = ${srcdir}/library src_doc_dir = ${srcdir}/doc src_test_dir = ${srcdir}/tests src_app_dir = ${srcdir}/apps src_generic_dir = ${srcdir}/generic -TCL_LIB_SPEC = -L/usr/local/src/tcl8.4.13/unix -ltcl8.4 -TK_LIB_SPEC = -F/Library/Frameworks -framework Tk -subdirs = library/store/XOTclSdbm/ library/store/XOTclGdbm/ library/xml/TclExpat-1.1/ +TCL_LIB_SPEC = -L/Users/neumann/src/tcl8.4.12/unix -ltcl8.4 +TK_LIB_SPEC = +subdirs = aol_prefix = /usr/local/aolserver # Requires native paths @@ -42,9 +42,9 @@ src_app_dir_native = `echo ${src_app_dir}` src_generic_dir_native = `echo ${src_generic_dir}` -libdirs = comm lib serialize actiweb rdf registry store xml patterns +libdirs = comm lib serialize libsrc = COPYRIGHT pkgIndex.tcl -appdirs = comm scripts utils actiweb persistence +appdirs = comm scripts utils appsrc = COPYRIGHT DOC_SOURCE = \ @@ -98,8 +98,8 @@ # configuration options) composed of the named objects. #======================================================================== -PKG_LIB_FILE = libxotcl1.4.0.dylib -PKG_STUB_LIB_FILE = libxotclstub1.4.0.a +PKG_LIB_FILE = libxotcl1.5.2.dylib +PKG_STUB_LIB_FILE = libxotclstub1.5.2.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.4.0 +PACKAGE_VERSION = 1.5.2 CC = gcc -pipe CFLAGS_DEFAULT = -Os CFLAGS_WARNING = -Wall -Wno-implicit-int @@ -143,19 +143,19 @@ SHLIB_CFLAGS = -fno-common SHLIB_LD = ${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT} -Wl,-single_module SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ -SHLIB_LD_LIBS = ${LIBS} -L/usr/local/src/tcl8.4.13/unix -ltclstub8.4 -L/Library/Frameworks/Tk.framework -ltkstub8.4 +SHLIB_LD_LIBS = ${LIBS} -L/Users/neumann/src/tcl8.4.12/unix -ltclstub8.4 STLIB_LD = ${AR} cr -TCL_DEFS = -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DHAVE_COREFOUNDATION=1 -DHAVE_LIBKERN_OSATOMIC_H=1 -DHAVE_OSSPINLOCKLOCK=1 -DHAVE_COPYFILE=1 -DMAC_OSX_TCL=1 -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=\"utf-8\" -DTCL_LOAD_FROM_MEMORY=1 -DTCL_WIDE_INT_TYPE=long\ long -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DHAVE_LANGINFO=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -TCL_BIN_DIR = /usr/local/src/tcl8.4.13/unix -TCL_SRC_DIR = /usr/local/src/tcl8.4.13 +TCL_DEFS = -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_COREFOUNDATION=1 -DHAVE_LIBKERN_OSATOMIC_H=1 -DHAVE_OSSPINLOCKLOCK=1 -DHAVE_COPYFILE=1 -DMAC_OSX_TCL=1 -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=\"utf-8\" -DTCL_LOAD_FROM_MEMORY=1 -DTCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING=1 -DTCL_WIDE_INT_TYPE=long\ long -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DHAVE_LANGINFO=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 +TCL_BIN_DIR = /Users/neumann/src/tcl8.4.12/unix +TCL_SRC_DIR = /Users/neumann/src/tcl8.4.12 # This is necessary for packages that use private Tcl headers -#TCL_TOP_DIR_NATIVE = "/usr/local/src/tcl8.4.13" +#TCL_TOP_DIR_NATIVE = "/Users/neumann/src/tcl8.4.12" # Not used, but retained for reference of what libs Tcl required TCL_LIBS = ${DL_LIBS} ${LIBS} ${MATH_LIBS} -pkgdatadir = /usr/local/share/xotcl1.4.0 -pkglibdir = /usr/local/lib/xotcl1.4.0 -pkgincludedir = /usr/local/include/xotcl1.4.0 +pkgdatadir = /usr/local/share/xotcl1.5.2 +pkglibdir = /usr/local/lib/xotcl1.5.2 +pkgincludedir = /usr/local/include/xotcl1.5.2 #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our @@ -169,20 +169,20 @@ DYLD_LIBRARY_PATH="$(EXTRA_PATH):$(DYLD_LIBRARY_PATH)" \ PATH="$(EXTRA_PATH):$(PATH)" \ TCLLIBPATH="$(top_builddir) ${srcdir}" -TCLSH_PROG = /usr/local/src/tcl8.4.13/unix/tclsh +TCLSH_PROG = /Users/neumann/src/tcl8.4.12/unix/tclsh TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = 1 -INCLUDES = -I"/usr/local/src/tcl8.4.13/generic" -I"/usr/local/src/tcl8.4.13/unix" -I./generic -EXTRA_CFLAGS = -DXOTCLVERSION=\"1.4\" -DXOTCLPATCHLEVEL=\".0\" -DHAVE_TCL_COMPILE_H=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 # 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.4.0\" -DPACKAGE_STRING=\"xotcl\ 1.4.0\" -DPACKAGE_BUGREPORT=\"\" -DMAC_OSX_TK=1 -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.4.0\" -DPACKAGE_STRING=\"xotcl\ 1.4.0\" -DPACKAGE_BUGREPORT=\"\" -DMAC_OSX_TK=1 -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.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) CONFIG_CLEAN_FILES = Makefile xotclConfig.sh apps/utils/xotclsh apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix autom4te.cache/ @@ -213,7 +213,7 @@ # of the Makefile, in the "BINARIES" variable. #======================================================================== -binaries: $(BINARIES) xotclsh xowish pkgIndex.tcl +binaries: $(BINARIES) xotclsh pkgIndex.tcl @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ for dir in $$dirs ; do \ if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ @@ -325,7 +325,7 @@ gdb: $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) -test: binaries libraries test-core test-actiweb +test: binaries libraries test-core #TESTFLAGS = -srcdir $(srcdir) test-core: $(TCLSH_PROG) @@ -337,6 +337,8 @@ -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/forwardtest.xotcl \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/slottest.xotcl \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/xocomm.test \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) test-actiweb: $(TCLSH_PROG) @@ -457,7 +459,7 @@ # genstubs: - $(TCLSH) $(TCL_TOOL_DIR_NATIVE)/genStubs.tcl $(src_generic_dir) \ + $(TCLSH) $(TCL_SRC_DIR)/tools/genStubs.tcl $(src_generic_dir) \ $(src_generic_dir)/xotcl.decls $(src_generic_dir)/xotclInt.decls # @@ -487,7 +489,7 @@ #======================================================================== clean: - -rm -rf $(BINARIES) $(CLEANFILES) xotclsh xowish pkgIndex.tcl ./receiver \ + -rm -rf $(BINARIES) $(CLEANFILES) xotclsh pkgIndex.tcl ./receiver \ $(target_doc_dir)/*-xotcl.html find ${srcdir} -type f -name \*~ -exec rm \{} \; @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ @@ -618,7 +620,7 @@ @echo " setenv TCLLIBPATH \"$(TCLLIBPATH)\"" @echo " and" @if test "x$(XOTCLSH)" = "x" ; then \ - echo " /usr/local/src/tcl8.4.13/unix/tclsh" ; \ + echo " /Users/neumann/src/tcl8.4.12/unix/tclsh" ; \ echo " package require XOTcl; namespace import -force xotcl::*" ; \ echo " or" ; \ echo " put the 'package require' line into your ~/.tclshrc" ; \ Index: xotcl/Makefile.in =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/Makefile.in (.../Makefile.in) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/Makefile.in (.../Makefile.in) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -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.19 2006/09/25 08:29:03 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.20 2006/09/27 08:12:39 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -337,6 +337,8 @@ -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/forwardtest.xotcl \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/slottest.xotcl \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/xocomm.test \ -libdir $(PLATFORM_DIR) $(TESTFLAGS) test-actiweb: $(TCLSH_PROG) @@ -457,7 +459,7 @@ # genstubs: - $(TCLSH) $(TCL_TOOL_DIR_NATIVE)/genStubs.tcl $(src_generic_dir) \ + $(TCLSH) $(TCL_SRC_DIR)/tools/genStubs.tcl $(src_generic_dir) \ $(src_generic_dir)/xotcl.decls $(src_generic_dir)/xotclInt.decls # Index: xotcl/apps/actiweb/AgentClient.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/actiweb/AgentClient.xotcl (.../AgentClient.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/actiweb/AgentClient.xotcl (.../AgentClient.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,5 @@ #!/usr/bin/env tclsh -# $Id: AgentClient.xotcl,v 1.4 2006/09/25 08:29:04 neumann Exp $ +# $Id: AgentClient.xotcl,v 1.5 2006/09/27 08:12:39 neumann Exp $ #if {![info exists ACTIWEB_HOME]} {source ~/actiweb/paths.xotcl} package require XOTcl; namespace import -force xotcl::* package require xotcl::package Index: xotcl/apps/actiweb/Counter.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/actiweb/Counter.xotcl (.../Counter.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/actiweb/Counter.xotcl (.../Counter.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,6 @@ #!../../src/xotclsh -# $Id: Counter.xotcl,v 1.3 2006/09/25 08:29:04 neumann Exp $ +# $Id: Counter.xotcl,v 1.4 2006/09/27 08:12:39 neumann Exp $ +#load /Users/neumann/src/xotcl-1.4.1/library/store/XOTclSdbm/libxotclsdbm1.2.dylib array set opts {-pkgdir .}; array set opts $argv lappend auto_path $opts(-pkgdir) Index: xotcl/apps/actiweb/univ/UNIVERSAL.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/actiweb/univ/UNIVERSAL.xotcl (.../UNIVERSAL.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/actiweb/univ/UNIVERSAL.xotcl (.../UNIVERSAL.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,5 @@ #!/usr/bin/env tclsh -#$Id: UNIVERSAL.xotcl,v 1.6 2006/09/25 08:29:04 neumann Exp $ +#$Id: UNIVERSAL.xotcl,v 1.7 2006/09/27 08:12:39 neumann Exp $ package require XOTcl; namespace import -force xotcl::* array set opts { -ssl 0 -instanceFile UNIVERSAL.rdf -cssFile UNIVERSAL.css -root . -pkgdir .} Index: xotcl/apps/comm/link-checker.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/comm/link-checker.xotcl (.../link-checker.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/comm/link-checker.xotcl (.../link-checker.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,5 @@ #!/usr/bin/env tclsh -# $Id: link-checker.xotcl,v 1.4 2006/09/25 08:29:04 neumann Exp $ +# $Id: link-checker.xotcl,v 1.5 2006/09/27 08:12:39 neumann Exp $ # -gn july 2000 package require XOTcl; namespace import -force xotcl::* Index: xotcl/apps/comm/test-tls-server.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/comm/test-tls-server.xotcl (.../test-tls-server.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/comm/test-tls-server.xotcl (.../test-tls-server.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,5 @@ #!../../src/xotclsh -# $Id: test-tls-server.xotcl,v 1.4 2006/09/25 08:29:04 neumann Exp $ +# $Id: test-tls-server.xotcl,v 1.5 2006/09/27 08:12:39 neumann Exp $ # # sample secure server that reflect all incoming data to the client # It uses tls1.3 package of Matt Newman Index: xotcl/apps/comm/webserver.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/comm/webserver.xotcl (.../webserver.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/comm/webserver.xotcl (.../webserver.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,5 @@ #!../../src/xotclsh -# $Id: webserver.xotcl,v 1.5 2006/09/25 08:29:04 neumann Exp $ +# $Id: webserver.xotcl,v 1.6 2006/09/27 08:12:39 neumann Exp $ array set opts {-root ../../doc -port 8086 -protected-port 9096 -pkgdir .} array set opts $argv lappend auto_path $opts(-pkgdir) Index: xotcl/apps/scripts/soccerClub.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/scripts/soccerClub.xotcl (.../soccerClub.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/apps/scripts/soccerClub.xotcl (.../soccerClub.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,4 +1,4 @@ -# $Id: soccerClub.xotcl,v 1.3 2006/09/25 08:29:04 neumann Exp $ +# $Id: soccerClub.xotcl,v 1.4 2006/09/27 08:12:39 neumann Exp $ # This is a simple introductory example for the language XOTcl. # It demonstrates the basic language constructs on the example of # a soccer club. Index: xotcl/apps/utils/xotclsh =================================================================== diff -u -rbb3c756fb47517596b9dbcb4e580aa1212827b41 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/utils/xotclsh (.../xotclsh) (revision bb3c756fb47517596b9dbcb4e580aa1212827b41) +++ xotcl/apps/utils/xotclsh (.../xotclsh) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,7 +1,7 @@ -#!/usr/local/src/tcl8.4.13/unix/tclsh +#!/Users/neumann/src/tcl8.4.12/unix/tclsh if {$argc == 0} { puts "Don't use [info script] as interactive shell! Use instead:" - puts " /usr/local/src/tcl8.4.13/unix/tclsh" + puts " /Users/neumann/src/tcl8.4.12/unix/tclsh" puts " package require XOTcl; namespace import ::xotcl::*" } else { package require XOTcl Index: xotcl/apps/utils/xowish =================================================================== diff -u -rbb3c756fb47517596b9dbcb4e580aa1212827b41 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/apps/utils/xowish (.../xowish) (revision bb3c756fb47517596b9dbcb4e580aa1212827b41) +++ xotcl/apps/utils/xowish (.../xowish) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,5 +1,5 @@ #!@WISH_PROG@ -###!/usr/local/src/tcl8.4.13/unix/tclsh +###!/Users/neumann/src/tcl8.4.12/unix/tclsh ###package require Tk if {$argc == 0} { puts "Don't use [info script] as interactive shell! Use instead:" Index: xotcl/config/mktar.sh =================================================================== diff -u -rf13b9000e83d3896683de0ecf438216be88832fe -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/config/mktar.sh (.../mktar.sh) (revision f13b9000e83d3896683de0ecf438216be88832fe) +++ xotcl/config/mktar.sh (.../mktar.sh) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -9,5 +9,5 @@ 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 .junk | fgrep -v "#" |fgrep -v .DS_Store| fgrep -v config.` Index: xotcl/configure =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/configure (.../configure) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/configure (.../configure) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xotcl 1.4.0. +# Generated by GNU Autoconf 2.59 for xotcl 1.5.2. # # 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.4.0' -PACKAGE_STRING='xotcl 1.4.0' +PACKAGE_VERSION='1.5.2' +PACKAGE_STRING='xotcl 1.5.2' 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.4.0 to adapt to many kinds of systems. +\`configure' configures xotcl 1.5.2 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.4.0:";; + short | recursive ) echo "Configuration of xotcl 1.5.2:";; esac cat <<\_ACEOF @@ -846,8 +846,8 @@ --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) --enable-wince enable Win/CE support (where applicable) - --disable-load disallow dynamic loading and "load" command - (default: enabled) + --enable-load allow dynamic loading and "load" command (default: + on) --enable-symbols build with debugging symbols (default: off) Optional Packages: @@ -979,7 +979,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xotcl configure 1.4.0 +xotcl configure 1.5.2 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.4.0, which was +It was created by xotcl $as_me 1.5.2, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1571,8 +1571,8 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 -XOTCL_MINOR_VERSION=4 -XOTCL_RELEASE_LEVEL=.0 +XOTCL_MINOR_VERSION=5 +XOTCL_RELEASE_LEVEL=.2 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -1902,12 +1902,12 @@ # on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ - -a x"${ac_cv_c_tclconfig}" = x ; then + -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do - if test -f "$i/tclConfig.sh" ; then - ac_cv_c_tclconfig=`(cd $i; pwd)` + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done @@ -4952,7 +4952,8 @@ if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7329,7 +7330,7 @@ # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - tcl_cv_sys_version=MP-RAS-`awk '{print }' /etc/.relid` + tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then tcl_cv_sys_version=AIX-`uname -v`.`uname -r` @@ -8396,7 +8397,7 @@ # NetBSD/SPARC needs -fPIC, -fpic will not do. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" @@ -8527,8 +8528,22 @@ CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" if test $do64bit = yes; then - do64bit_ok=yes - CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + do64bit_ok=yes + case `arch` in + ppc) + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5";; + i386) + CFLAGS="$CFLAGS -arch x86_64";; + *) + { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 +echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;} + do64bit_ok=no;; + esac + else + # Check for combined 32-bit and 64-bit fat build + echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \ + echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \ + fat_32_64=yes fi # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here: SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' @@ -8538,9 +8553,9 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" - cat >conftest.$ac_ext <<_ACEOF + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8586,20 +8601,20 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags + LDFLAGS=$hold_ldflags fi echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then - SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: - test -z "${MACOSX_DEPLOYMENT_TARGET}" || \ - test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \ + test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ + "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \ LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 @@ -8608,9 +8623,9 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" - cat >conftest.$ac_ext <<_ACEOF + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8656,22 +8671,22 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags + LDFLAGS=$hold_ldflags fi echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" - # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS - # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit - # at present (no 64bit GUI libraries). - test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \ - CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`" + # TEA specific: for Tk extensions, remove 64-bit arch flags from + # CFLAGS for combined 32-bit and 64-bit fat builds as neither TkAqua + # nor TkX11 can be built for 64-bit at present. + test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}" && \ + CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`" ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -9991,6 +10006,9 @@ fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + if test "$GCC" = "yes"; then + PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} + fi # These aren't needed on Windows (either MSVC or gcc) RANLIB=: RANLIB_STUB=: @@ -10552,7 +10570,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by xotcl $as_me 1.4.0, which was +This file was extended by xotcl $as_me 1.5.2, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10607,7 +10625,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xotcl config.status 1.4.0 +xotcl config.status 1.5.2 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -11213,3 +11231,11 @@ + + + + + + + + Index: xotcl/configure.in =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/configure.in (.../configure.in) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/configure.in (.../configure.in) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -11,7 +11,7 @@ # for this package, and can be a relative path, such as: # #-------------------------------------------------------------------- -define(XOTclVersion, 1.4.0) +define(XOTclVersion, 1.5.2) AC_INIT([xotcl], [XOTclVersion]) #-------------------------------------------------------------------- @@ -103,8 +103,8 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 -XOTCL_MINOR_VERSION=4 -XOTCL_RELEASE_LEVEL=.0 +XOTCL_MINOR_VERSION=5 +XOTCL_RELEASE_LEVEL=.2 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -464,3 +464,11 @@ + + + + + + + + Index: xotcl/doc/Announce-1.5.0 =================================================================== diff -u -r2c98844f5e9a46a8ecb2c8aa8d714592a07b311d -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/doc/Announce-1.5.0 (.../Announce-1.5.0) (revision 2c98844f5e9a46a8ecb2c8aa8d714592a07b311d) +++ xotcl/doc/Announce-1.5.0 (.../Announce-1.5.0) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,35 +1,38 @@ Announcing XOTcl 1.5.0 ************************* -Hi everybody. I am pleased to announce the availability of XOTcl 1.5.0. +Hi everybody. We are pleased to announce the availability of XOTcl 1.5.0. Major changes relative to 1.4.0 are: * Improved Functionality - + The C-level implementation of XOTcl create now the basic - classes ::xotcl::Object and ::xotcl::Class completely without - any methods. All predefined methods are now registered - from the initialization script-code (predefined.xotcl) - via the new command + + The C-level implementation of XOTcl creates now the basic + classes ::xotcl::Object and ::xotcl::Class completely without + any methods. All predefined methods are now registered from + the initialization script-code (predefined.xotcl) via the new + command - ::xotcl::alias | \ - ?-objscope? ?-per-object? + ::xotcl::alias | \ + ?-objscope? ?-per-object? - which is used for registering predefined Tcl commands - as methods. These aliases are like zero cost forwarders, - since they lookup the function pointer from the commands - and used these in the methods. + which is used for registering predefined Tcl commands as + methods. These aliases are like zero cost forwarders, since + they lookup the function pointer from the commands and used + these in the methods. - This change makes it possible to register the same command - on different classes (with maybe different names), such that - for example the predefined set method of ::xotcl::Object - can be replaced with a different method and the set method - can be registered on some other classes (maybe some - application classes). This change makes it as well quite - easy to use the XOTcl framework to develop some other - object oriented frameworks. + This change makes it possible to register the same command + on different classes (with maybe different names), such that + for example the predefined set method of ::xotcl::Object can + be replaced with a different method and the set method can + be registered on some other classes (maybe some application + classes). + This change makes it as well quite easy to develop some + other object oriented languages based on the XOTcl + framework, since all methods can be rearrange from the Tcl + layer . + + Slots A slot is a meta-object that manages property-changes of @@ -103,7 +106,7 @@ Person p1 -name "Joe" p1 projects add project1 - Some addtional features of the slots are: + Some additional features of the slots are: - Support for value checking for * primitive types (all types from "string is", like integer, @@ -118,9 +121,9 @@ variables, not all variables are used for each object) - more experimental low level functionality, like - * initcmd (executed, whenver the variable is read the first time) - * valuecmd (executed, whenver the variable is read) - * valuechangedcmd (executed, whenver the variable is altered) + * initcmd (executed, whenever the variable is read the first time) + * valuecmd (executed, whenever the variable is read) + * valuechangedcmd (executed, whenever the variable is altered) For more details, see http://media.wu-wien.ac.at/doc/tutorial.html#slots @@ -158,7 +161,7 @@ - Now other ::xotcl::* objects can be included in the aolserver blueprint (e.g. non positional argument handlers) - handling of slot dependencies - - more conveniant calling of the serializer: + - more convenient calling of the serializer: Method "serialize" for Object is defined when the package xotcl::serializer is loaded. @@ -178,12 +181,13 @@ prior to invocation. + New snit-like utility functions: - - ::xotcl::myvar varname: return the fully qualified variable name of the specified variable. - - ::xotcl::myproc methodname ?args?: call an xotcl method without the need + - ::xotcl::myvar varName: return the fully qualified variable name + of the specified variable. + - ::xotcl::myproc methodName ?args?: call an xotcl method without the need of using "[list [self] methodName ...]" Both commands are namespace exported - + added "subst" to the set of tcl imported methods (like e.g. incr, append, ...) + + added "subst" to the set of Tcl imported methods (like e.g. incr, append, ...) On can do now: % Object o ::o @@ -201,7 +205,7 @@ positional arguments and "args" + fixed a bug in nonpositional arguments when called without arguments - + tested with tcl 8.4.13 and 8.5a4 + + tested with Tcl 8.4.13 and 8.5a4 + improved error messages in connection with nonpositional arguments + fixed a bug in the xotcl trace module (many thanks to jima for reporting) + fixed a namespace bug in ::xotcl::package require in connection with xotclide Index: xotcl/doc/index.html =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/doc/index.html (.../index.html) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/doc/index.html (.../index.html) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -22,7 +22,7 @@

Index: xotcl/doc/langRef-xotcl.pdf =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f Binary files differ Index: xotcl/doc/langRef.xotcl =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,15 +1,16 @@ -# $Id: langRef.xotcl,v 1.12 2006/09/25 08:29:04 neumann Exp $ -package provide XOTcl-langRef 1.4.0 +# $Id: langRef.xotcl,v 1.13 2006/09/27 08:12:40 neumann Exp $ +package provide XOTcl-langRef 1.5.0 package require XOTcl @ @File { description { XOTcl language reference. Describes predefined objects and classes. } "predefined primitives" { - XOTcl contains three predefined primitives: - <@p> - <@tt>self<@/tt> computes callstack related information. + XOTcl contains the following predefined primitives (Tcl commands): +

+
<@tt>self<@/tt>
+
computes callstack related information. It can be used in the following ways: <@UL> <@LI><@TT>self - returns the name @@ -50,38 +51,63 @@ <@li><@TT>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 + call, whatever is higher in the stack. The level is returned in a form it can be used as first argument in <@TT>uplevel or <@TT>upvar. <@/UL> - <@/p><@p> - <@tt>my someMethod<@/tt> is a short form for <@tt>[self] someMethod and can only be + <@/p> +
+ +
<@tt>my methodName<@/tt>
+
is a short form for <@tt>[self] methodName and can only be called in a context of an instproc or an method specific proc. It allows certain optimizations and shorter to write. <@/p><@p> - <@tt>next <@/tt> invokes the next shadowed (same-named) method on the + <@tt>next <@/tt>
invokes the next shadowed (same-named) method on the precedence path and returns its result. If <@tt>next is called without arguments, the arguments of the current method are passed through the called method. If <@tt>next is invoked with the flag <@tt>--noArgs, the shadowed method is called without arguments. If other arguments are specified for next, these will be used for the call. - <@/p> - <@/p><@p> - <@tt>::xotcl::configure filter ?on|off?<@/tt> allows to + <@/dd> +
<@tt>myvar varName
+
returns the fully qualified variable name of the specified + variable.

+

+ +
<@tt>myproc methodName ?args?
+
calls the specified XOTcl method without the need + 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 + (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 + class object only, but not for the instances). This command + can be used to bootstrap xotcl (when e.g. no methods are available).

+

+ +
::xotcl::configure filter ?on|off?<@/tt>
+
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. - <@/p> - <@p> - <@tt>::xotcl::configure softrecreate ?on|off?<@/tt> allows to control + to serialize the objects classes independent of filter settings.

+

+ + +
<@tt>::xotcl::configure softrecreate ?on|off?<@/tt>
+
allows to control what should happen, when an object / a class is recreated. Per default it is set off, which means that the object/class is destroyed and all relations (e.g. subclass/superclass) to other objects/classes are destroyed as well. If <@tt>softrecreate is - set, the object is resetted, but not destroyed, the relations + set, the object is reseted, but not destroyed, the relations are kept. This is important, when e.g. reloading a file with class definitions (e.g. when used in OpenACS with file watching and reloading). With <@tt>softrecreate set, @@ -90,12 +116,14 @@ Example: e.g. there is a class hierarchy A <- B <- C Without <@tt>softrecreate set, a reload of B means first a destroy of B, leading to A <- C, and instances - of B are reclassed to ::xotcl::Object. When <@tt>softrecreate is - set, the structure remeans unchanged. - <@/p> + of B are re-classed to ::xotcl::Object. When <@tt>softrecreate is + set, the structure remains unchanged. +
+
+ } - date { $Date: 2006/09/25 08:29:04 $ } + date { $Date: 2006/09/27 08:12:40 $ } } ## @@ -110,7 +138,7 @@ @ Object instproc abstract { methtype "instproc or proc" - methname "name of abstract method" + methodName "name of abstract method" arglist "arguments" } { Description { @@ -186,12 +214,14 @@ } @ Object instproc class { - newClass "new class name" + newClass "?new class?" } { - Description { - Changes the class of an object dynamically to <@tt>newClass. - } - return "empty string" + Description { + Changes the class of an object dynamically to <@tt>newClass. + The method returns the current value of class, + when it is called without arguments. + } + return "if <@tt>newClass is not specified return class, otherwise empty" } @ Object instproc cleanup { @@ -208,21 +238,71 @@ ?args? "'-' method calls" } { Description { - Calls the '-' methods. I.e. evaluates arguments and calls + 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 is called + is interpreted as a method argument. configure/tt> is called before the constructor during initialization and recreation. - E.g. + In the following example, the variable set is called via + configure before init: <@pre class='code'> Object o -set x 4 - here: + The method configure can be called with the + dash-notation at arbitrary times: <@pre class='code'> o configure -set x 4 - is executed. + } + return "number of the skipped first arguments" +} +@ Object instproc contains { + "?-withnew?" "Option to overload new to create new objects within + the specified object. Per default, this option is turned on." + "?-object?" "object, in which the new objects should be created. + The default is the object, for which contains>/tt> was called." + "?-class?" "In combination with option -object: If the specified + object does not exist, create it from the specified class. The default + is ::xotcl::Object" + cmd "Tcl command to create multiple objects" +} { + Description { + This method can be used to create nested object structures + with little syntactic overhead. The method changes the namespace + to the specified object and creates objects there. + Optionally, a different object scope can be specified and + creating new objects in the specified scope can be turned off. + The following command creates a three rectangles, containing some + points. +
+  Class Point -parameter {{x 100} {y 300}}
+  Class Rectangle -parameter {color}
+
+  Rectangle r0 -color pink -contains {
+    Rectangle r1 -color red -contains {
+      Point x1 -x 1 -y 2
+      Point x2 -x 1 -y 2
+    }
+    Rectangle r2 -color green -contains {
+      Point x1
+      Point x2
+    }
   }
+
+ The resulting object structure looks like in the folloing + example (simplified). +
+   ::r0
+   ::r0::r1
+   ::r0::r1::x1
+   ::r0::r1::x2
+   ::r0::r2
+   ::r0::r2::x1
+   ::r0::r2::x2
+
+ } return "number of the skipped first arguments" } + + @ Object instproc copy { newName "destination of copy operation" } { @@ -261,7 +341,7 @@ @ Object instproc extractConfigureArg { al "Argument List Name" - name "Name of the Configure Argument to be extracted (should start with '-')" + name "Name of the configure argument to be extracted (should start with '-')" ?cutTheArg? "if cutTheArg not 0, it cut from upvar argsList, default is 0" } { Description { @@ -283,22 +363,23 @@ } @ Object instproc filter { - args "filter specification" + ?args? "filter specification" } { Description { If <@tt>$args is one argument, it specifies a list of filters to be set. Every filter must be an XOTcl proc/instproc within the object scope. If <@tt>$args it has more argument, the first one specifies the - action. Possible values are <@tt>set, <@tt>get, + action. Possible values are <@tt>assign, <@tt>get, <@tt>add or <@tt>delete, it modifies the current - settings as indicated. For more details, check the tutorial. + settings as indicated. For more details, check the + tutorial. } return "if <@tt>$args return empty current filters, otherwise empty" } @ Object instproc filterguard { - filtername "filter name of a registered filter" + filterName "filter name of a registered filter" guard "set of conditions to execute the filter" } { description { @@ -316,30 +397,37 @@ Search a full qualified method name that is currently registered as a filter. Return a list of the proc qualifier format: - 'objName|classname proc|instproc methodName'. + 'objName|className proc|instproc methodName'. } return "full qualified name, if filter is found, otherwise an empty string" } @ Object instproc forward { - name "name of forwarder method" - ?options? "-objscope, -methodprefix string, -default names" + methodName "name of forwarder method" + ?options? "-objscope, -methodprefix string, -default names, -earlybinding, -verbose" ?callee? "named of the called command or object" ?args? "arguments" } { Description { - Register a method (similar to a proc) for forwarding calls to - a callee (target tcl command, - other object). If the forwarder method is called, the actual arguments + Register an object specific method (similar to a proc) for forwarding calls to + a callee (target Tcl command, other object). + When the forwarder method is called, the actual arguments of the invocation are appended to the specified arguments. In callee an - arguments certain substituions can take place: -
  • %proc: subsituted by name of the forwarder method
  • -
  • %self: subsituted by name of the object
  • -
  • %1: subsituted by first argument of the invocation
  • + arguments certain substitutions can take place: +
    • %proc: substituted by name of the forwarder method
    • +
    • %self: substitute by name of the object
    • +
    • %1: substitute by first argument of the invocation
    • +
    • {%@POS value}: substitute the specified value in the argument list + on position POS, where POS can be a positive or negative integer + or end. Positive integers specify the position from the begin + of the list, while negative integer specify the position from the end. +
    • {%argclindex LIST}: take the nth argument of the specified list as + substitution value, where n is the number of arguments from the + invocation.
    • %%: a single percent.
    • -
    • %tcl-command: command to be executed; substituted by result.
    • +
    • %Tcl-command: command to be executed; substituted by result.
    Additionally each argument can be prefixed by the positional prefix %@POS (note the delimiting space at the end) that can be used to specify an @@ -352,8 +440,17 @@ in front of the second argument of the invocation,
  • -default is used for default method names (only in connection with %1)
  • +
  • -earlybinding: look up the function + pointer of the called Tcl command at + definition time of the forwarder instead of invocation time. + This option should only be used + for calling C-implemented Tcl commands, no procs etc.);
  • +
  • -verbose
  • : print the substituted command to stderr + before executing
- See tutorial for detailed examples. + See + tutorial + for detailed examples. } return "empty" } @@ -399,8 +496,8 @@ Returns the body of the specified proc (object specific method). <@li><@TT>objName info class ?classname?: - Returns the name of the class of the current object, if classname was - not specified, otherwise it returns 1 if classname matches the + Returns the name of the class of the current object, if className was + not specified, otherwise it returns 1 if className matches the object's class and 0 if not. <@li><@TT>objName info children ?pattern?: Returns the @@ -438,9 +535,6 @@ <@li><@TT>objName info invar: Returns object invariants. - <@li><@TT>objName info metadata ?pattern?: - Returns available metadata options. - <@li><@TT>objName info methods: Returns the list of all methods currently reachable for objName. Includes procs, instprocs, cmds, instcommands on object, class hierarchy and mixins. @@ -486,8 +580,8 @@ } @ Object instproc instvar { - v1 "instvar variable" - "?v2...vn?" "optional other instvar variables" + v1 "name of instance variable" + "?v2...vn?" "optional other names for instance variables" } { Description { Binds an variable of the object to the current method's scope. @@ -582,16 +676,19 @@ return "empty string" } + + @ Object instproc mixin { - args "mixin specification" + ?args? "mixin specification" } { Description { If <@tt>$args is one argument, it specifies a list of mixins to be set. Every mixin must be a defined class. If <@tt>$args has more argument, the first one specifies the - action. Possible values are <@tt>set, <@tt>get, + action. Possible values are <@tt>assign, <@tt>get, <@tt>add or <@tt>delete, it modifies the current - settings as indicated. For more details, check the tutorial. + settings as indicated. For more details, check the + tutorial. } return "if <@tt>$args empty return current mixins, otherwise empty" } @@ -603,6 +700,8 @@ Perform a deep move of the object/class (with all information, like class, parameter, filter, ...) to "newName". + Note that move is currently implemented as a copy plus + subsequent destroy operation. } return "empty string" } @@ -644,7 +743,7 @@ @ Object instproc proc { name "method name" - ?non-pos-args? "optinal non-positional arguments" + ?non-pos-args? "optional non-positional arguments" args "method arguments" body "method body" "?preAssertion?" "optional assertions that must hold before the proc executes" @@ -666,15 +765,18 @@ } @ Object instproc procsearch { - procname "simple proc name" + procName "simple proc name" } { Description { - Search for a proc or instproc on an object and return the fully + Search which method should be invoked for an object and return the fully qualified name of the method as a list in proc qualifier format: - 'objName|classname proc|instproc methodName'. E.g., + 'objName|className proc|instproc|forward|instforward|parametercmd|instparametercmd|cmd|instcmd methodName'. + The proc qualifier format reports the command used to create the method. The + only exception is instcmd and cmd, which refer to commands implemented in C. + E.g., <@pre class='code'> o procsearch set - returns <@pre>::xotcl::Object instproc set. + returns <@pre>::xotcl::Object instcmd set. } return "fully qualified name of the searched method or empty string if not found" } @@ -695,13 +797,13 @@ e.g. huge numbers of objects are created. <@TT>requireNamespace is often needed when e.g. using Tk widgets when variables are to be referenced via the namespace - (with <@TT>... -variable [self]::varname ...). + (with <@TT>... -variable [self]::varName ...). } return "empty string" } @ Object instproc set { - varname "name of the instance variable" + varName "name of the instance variable" ?value? "optional new value" } { Description { @@ -713,6 +815,18 @@ return "Value of the instance variable" } +@ Object instproc subst { + options "?-nobackslashes? ?-nocommands? ?-novariables?" + string "string to be substituted" +} { + Description { + Perform backslash, command, and variable substitutions + in the scope of the given object + (see documentation of Tcl command with the same name for details). + } + return "substituted string" +} + @ Object instproc trace { varName "name of variable" } { @@ -724,6 +838,7 @@ } @ Object instproc unset { + "?-nocomplain?" "possible error messages are suppressed" v1 "Variable to unset" "?v2...vn?" "Optional more vars to unset" } { @@ -740,21 +855,21 @@ Description { When this method is used without the optional level, it is a short form of the Tcl command - <@pre class='code'> upevel [self callinglevel] command ?args?<@/pre> - When it is called with the level, it is compatible with the original tcl command. + <@pre class='code'> uplevel [self callinglevel] command ?args?<@/pre> + When it is called with the level, it is compatible with the original Tcl command. } return "result of the command" } @ Object instproc upvar { ?level? "Level" - othervar localvar "referenced variable and variale in the local scope" - ?othervar localvar? "optional pairs of referenced and local variable names" + otherVar localVar "referenced variable and variable in the local scope" + ?otherVar localVar? "optional pairs of referenced and local variable names" } { Description { When this method is used without the optional level, it is a short form of the Tcl command - <@pre class='code'> upvar [self callinglevel] othervar localvar ?...?<@/pre>. - When it is called with the level, it is compatible with the original tcl command. + <@pre class='code'> upvar [self callinglevel] otherVar localVar ?...?<@/pre>. + When it is called with the level, it is compatible with the original Tcl command. } return "result of the command" } @@ -969,25 +1084,26 @@ } @ Class instproc instfilter { - args "instfilter specification" + ?args? "instfilter specification" } { Description { If <@tt>$args is one argument, it specifies a list of instfilters to be set. Every filter must be an XOTcl proc/instproc within the object scope. If <@tt>$args it has more argument, the first one specifies the - action. Possible values are <@tt>set, <@tt>get, + action. Possible values are <@tt>assign, <@tt>get, <@tt>add or <@tt>delete, it modifies the current - settings as indicated. For more details, check the tutorial. + settings as indicated. For more details, check the + tutorial. } return "if <@tt>$args return empty current instfilters, otherwise empty" } @ Class instproc instfilterguard { - filtername "filter name of a registered filter" + filterName "filter name of a registered filter" guard "set of conditions to execute the filter" } { description { @@ -1000,23 +1116,31 @@ @ Class instproc instforward { - name "name of forwarder method" - ?options? "-objscope, -methodprefix string, -default names" + methodName "name of forwarder method" + ?options? "-objscope, -methodprefix string, -default names, -earlybinding, -verbose" ?callee? "named of the called command or object" ?args? "arguments" } { Description { - Register a method (similar to an instproc) for forwarding calls to - a callee (target tcl command, - other object). If the forwarder method is called, the actual arguments + Register a method for the instances of a class (similar to an instproc) + for forwarding calls to a callee (target Tcl command, + other object). + When the forwarder method is called, the actual arguments of the invocation are appended to the specified arguments. In callee an - arguments certain substituions can take place: -
  • %proc: subsituted by name of the forwarder method
  • -
  • %self: subsituted by name of the object
  • -
  • %1: subsituted by first argument of the invocation
  • + arguments certain substitutions can take place: +
    • %proc: substituted by name of the forwarder method
    • +
    • %self: substitute by name of the object
    • +
    • %1: substitute by first argument of the invocation
    • +
    • {%@POS value}: substitute the specified value in the argument list + on position POS, where POS can be a positive or negative integer + or end. Positive integers specify the position from the begin + of the list, while negative integer specify the position from the end. +
    • {%argclindex LIST}: take the nth argument of the specified list as + substitution value, where n is the number of arguments from the + invocation.
    • %%: a single percent.
    • -
    • %tcl-command: command to be executed; substituted by result.
    • +
    • %Tcl-command: command to be executed; substituted by result.
    Additionally each argument can be prefixed by the positional prefix %@POS (note the delimiting space at the end) that can be used to specify an @@ -1026,11 +1150,20 @@
    • -objscope causes the target to be evaluated in the scope of the object,
    • -methodprefix string inserts the specified prefix - in front of the second argument of the invocation,
    • -
    • -default is used for default method names (only in - connection with %1). + in front of the second argument of the invocation,
    • +
    • -default is used for default method names (only + in connection with %1)
    • +
    • -earlybinding: look up the function + pointer of the called Tcl command at + definition time of the forwarder instead of invocation time. + This option should only be used + for calling C-implemented Tcl commands, no procs etc.);
    • +
    • -verbose
    • : print the substituted command to stderr + before executing
    - See tutorial for detailed examples. + See tutorial + for detailed examples. + } return "empty" } @@ -1048,15 +1181,16 @@ } @ Class instproc instmixin { - args "instmixin specification" + ?args? "instmixin specification" } { Description { If <@tt>$args is one argument, it specifies a list of instmixins to be set. Every instmixin must be a defined class. If <@tt>$args has more argument, the first one specifies the - action. Possible values are <@tt>set, <@tt>get, + action. Possible values are <@tt>assign, <@tt>get, <@tt>add or <@tt>delete, it modifies the current - settings as indicated. For more details, check the tutorial. + settings as indicated. For more details, check the + tutorial. } return "if <@tt>$args empty return current instmixins, otherwise empty" } @@ -1081,7 +1215,7 @@ @ Class instproc instproc { name "instance method name" - ?non-pos-args?" "optinal 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" @@ -1108,7 +1242,7 @@ description { Convenience method to create an autonamed object. E.g.: <@pre class='code'> - Http new + HTTP new creates ::xotcl::__#0, a subsequent call creates ::xotcl::__#1, ...<@br> If <@tt>-childof obj is specified, the new object is created as a child of the specified object. @@ -1182,13 +1316,15 @@ } @ Class instproc superclass { - classList "list of classes" + classList "?list of classes?" } { description { Specify super-classes for a class. "superclass" changes the list - of superclasses dynamically to <@tt>classList. + of superclasses dynamically to <@tt>classList. + The method returns the current value of superclass, + when it is called without arguments. } - return "empty string" + return "if <@tt>classList is not specified return superclass(es), otherwise empty" } @ Class instproc unknown { @@ -1209,13 +1345,13 @@ return "Standard unknown mechanism returns result of create" } -@ Class instproc volatile { +@ Object instproc volatile { "" "" } { description { This method is used to specify that the object should be deleted automatically, when the current - tcl-proc/object-proc/instproc is left. Example: + Tcl-proc/object-proc/instproc is left. Example: <@pre class='code'> set x [Object new -volatile] } return "empty string" @@ -1240,6 +1376,73 @@ return "empty string" } +@ Class ::xotcl::Slot -superclass Object { + description { + A slot is a meta-object that manages property-changes of + objects. A property is either an attribute or a role of an + relation (e.g. in system slots). + The predefined system slots are class, + superclass, mixin, instmixin, + filter, instfilter. These slots appear + as methods of Object or Class. + +

    The slots provide a common query and setting interface. + Every multivalued slot provides e.g. a method add + to add a value to the list of values, and a method delete + which removes it. See for example the documentation of the slot + mixin.

    + + Parameters:

    + + + + + + + +
    -name Name of the slot to access from an object the slot
    -domain domain (object or class) of a slot on which it can be used
    -multivalued boolean value for specifying single or multiple values (lists)
    -defaultmethods list of two elements for specifying which methods are called + per default, when no slot method is explicitly specified
    -manager the manager object of the slot (per default [self])
    -per-object specify whether a slot should be used per class or per object; note that there is a restricted usage if applied per class, since defaults etc, work per initialization
    + +

    For more details, consult the + tutorial.

    + } +} +@ Class Attribute -superclass ::xotcl::Slot { + description { + Attribute slots are used to manage the setting and querying + of instance variables. + + Parameters:

    + + + + + + +
    -default specify a default value
    -type specify the type of a slot
    -initcmd specify a Tcl command to be executed when the value of the + associated variable is read the first time; allows lazy initialization
    -valuecmd specify a Tcl command to be executed whenever the variable is read
    -valuechangedcmd specify a Tcl command to be executed whenever the variable is changed
    + +

    Example of a class definition with three attribute slots:

    +
    +  <@tt>Class Person -slots {
    +    Attribute name
    +    Attribute salary -default 0
    +    Attribute projects -default {} -multivalued true
    +  }
    +  Person p1 -name "John Doe"
    +
    +
    +   

    The slot parameters default, initcmd and + valuecmd have to be used mutually exclusively. + For more details, consult the + tutorial. +

    + } +} + + + + #Class::Parameter instproc values {param args} #proc xotcl_mkindex Index: xotcl/doc/tutorial.html =================================================================== diff -u -r2846921e448d4d4aeb3245ebbfe4381182f0e286 -r1aa7246cc8e44078c9dbd33e03992478615f314f --- xotcl/doc/tutorial.html (.../tutorial.html) (revision 2846921e448d4d4aeb3245ebbfe4381182f0e286) +++ xotcl/doc/tutorial.html (.../tutorial.html) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) @@ -1,10 +1,10 @@ - + XOTcl - Tutorial - +