Index: xotcl/ChangeLog =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd --- xotcl/ChangeLog (.../ChangeLog) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/ChangeLog (.../ChangeLog) (revision 2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd) @@ -1,3 +1,12 @@ +2004-10-30 Gustaf.Neumann@wu-wien.ac.at + * added error message when someone tries to delete a + non-existing proc/instproc + * using less memory for objects and classes with procs/instprocs, + when they do not use assertions (saving 14%) + * prettified langref with css + * documented deletions of object procs and instproc through + proc/instproc with empty args and empty body + 2004-10-13 Gustaf.Neumann@wu-wien.ac.at * make namespace handling code more orthogonal * using resolver for exists method (might be used in future for Index: xotcl/Makefile =================================================================== diff -u -r19ca82711d9d349fed79fa63af7529833aa9885d -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd --- xotcl/Makefile (.../Makefile) (revision 19ca82711d9d349fed79fa63af7529833aa9885d) +++ xotcl/Makefile (.../Makefile) (revision 2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd) @@ -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.21 2004/10/09 22:34:36 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.22 2004/10/30 20:19:55 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== -#XOTCL_VERSION = 1.3.1 +#XOTCL_VERSION = 1.3.3 XOTCL_VERSION = 1.3 src_lib_dir = ${srcdir}/library @@ -32,6 +32,7 @@ TCL_LIB_SPEC = -L/home/neumann/import/tcl8.4.7/unix -ltcl8.4 TK_LIB_SPEC = -L/usr/lib -ltk8.4 subdirs = library/store/XOTclSdbm/ library/store/XOTclGdbm/ library/xml/TclExpat-1.1/ +aol_prefix = /usr/local/aolserver libdirs = comm lib serialize actiweb rdf registry store xml patterns libsrc = COPYRIGHT pkgIndex.tcl @@ -89,8 +90,8 @@ # configuration options) composed of the named objects. #======================================================================== -PKG_LIB_FILE = libxotcl1.3.1.so -PKG_STUB_LIB_FILE = libxotclstub1.3.1.a +PKG_LIB_FILE = libxotcl1.3.3.so +PKG_STUB_LIB_FILE = libxotclstub1.3.3.a lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) BINARIES = $(lib_BINARIES) @@ -117,7 +118,7 @@ INSTALL_SCRIPT = ${INSTALL} PACKAGE_NAME = xotcl -PACKAGE_VERSION = 1.3.1 +PACKAGE_VERSION = 1.3.3 CC = gcc -pipe CFLAGS_DEFAULT = -O CFLAGS_WARNING = -Wall -Wconversion -Wno-implicit-int @@ -144,9 +145,9 @@ # Not used, but retained for reference of what libs Tcl required TCL_LIBS = ${DL_LIBS} ${LIBS} ${MATH_LIBS} -pkgdatadir = /usr/share/xotcl1.3.1 -pkglibdir = /usr/lib/xotcl1.3.1 -pkgincludedir = /usr/include/xotcl1.3.1 +pkgdatadir = /usr/share/xotcl1.3.3 +pkglibdir = /usr/lib/xotcl1.3.3 +pkgincludedir = /usr/include/xotcl1.3.3 #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our @@ -165,15 +166,15 @@ SHARED_BUILD = 1 INCLUDES = -I$(TCL_SRC_DIR)/generic -I$(TCL_SRC_DIR)/unix -I./generic -EXTRA_CFLAGS = -DXOTCLVERSION=\"1.3\" -DXOTCLPATCHLEVEL=\".1\" -DHAVE_TCL_COMPILE_H=1 +EXTRA_CFLAGS = -DXOTCLVERSION=\"1.3\" -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.3.1\" -DPACKAGE_STRING=\"xotcl\ 1.3.1\" -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 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=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_READDIR_R=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) -DEFS = -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.3.1\" -DPACKAGE_STRING=\"xotcl\ 1.3.1\" -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 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=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_READDIR_R=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) +#DEFS = $(TCL_DEFS) -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.3.3\" -DPACKAGE_STRING=\"xotcl\ 1.3.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 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=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_READDIR_R=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) +DEFS = -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.3.3\" -DPACKAGE_STRING=\"xotcl\ 1.3.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 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=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_READDIR_R=1 -DTCL_THREADS=1 -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/ @@ -242,7 +243,7 @@ install-aol: install-binaries install-libraries $(INSTALL) $(src_generic_dir)/aol-xotcl.tcl \ - $(DESTDIR)/usr/local/aolserver/modules/tcl/xotcl.tcl + $(DESTDIR)/$(aol_prefix)/modules/tcl/xotcl.tcl #======================================================================== @@ -612,6 +613,7 @@ bin-tar: (cd ..; tar zcvf xotcl-$(PACKAGE_VERSION)-bin-linux-i686-glibc.tar.gz \ `find $(exec_prefix)/bin/xotclsh $(exec_prefix)/bin/xowish \ + $(prefix)/lib/xotcl* \ $(prefix)/include/xotcl*.h \ $(DESTDIR)$(pkglibdir) $(prefix)/man/man1/xo* \ -type f -o -type l | fgrep -v CVS | fgrep -v SCCS | fgrep -v .junk| fgrep -v .db | fgrep -v "~" | fgrep -v "#" | fgrep -v /receiver/` \ Index: xotcl/configure =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd --- xotcl/configure (.../configure) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/configure (.../configure) (revision 2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd) @@ -6840,7 +6840,7 @@ fi aol_prefix="/usr/local/aolserver" -if test -d "$(DESTDIR)$(prefix)/modules/tcl" ; then aol_prefix="$(prefix)" ; fi +if test -d "${prefix}/modules/tcl" ; then aol_prefix="$(prefix)" ; fi #-------------------------------------------------------------------- Index: xotcl/configure.in =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd --- xotcl/configure.in (.../configure.in) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/configure.in (.../configure.in) (revision 2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd) @@ -164,7 +164,7 @@ fi aol_prefix="/usr/local/aolserver" -if test -d "$(DESTDIR)$(prefix)/modules/tcl" ; then aol_prefix="$(prefix)" ; fi +if test -d "${prefix}/modules/tcl" ; then aol_prefix="$(prefix)" ; fi AC_SUBST(aol_prefix) #-------------------------------------------------------------------- Index: xotcl/doc/langRef-xotcl.pdf =================================================================== diff -u -raf574e7e934986818f402ee382f7cdab57feed39 -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd Binary files differ Index: xotcl/doc/langRef.xotcl =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd --- xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision 2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd) @@ -1,5 +1,5 @@ -# $Id: langRef.xotcl,v 1.5 2004/10/13 10:35:43 neumann Exp $ -package provide XOTcl-langRef 1.3 +# $Id: langRef.xotcl,v 1.6 2004/10/30 20:19:55 neumann Exp $ +package provide XOTcl-langRef 1.3.3 package require Tcl @ @File { @@ -51,7 +51,6 @@ call, whatsever 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 @@ -63,7 +62,7 @@ <@/p> } - date { $Date: 2004/10/13 10:35:43 $ } + date { $Date: 2004/10/30 20:19:55 $ } } ## @@ -125,12 +124,12 @@ autoname creates an automatically assigned name. It is constructed from the base name plus an index, that is incremented for each usage. E.g.: - <@pre>$obj autoname a + <@pre class='code'> $obj autoname a produces a0, a1, a2, ... Autonames may have format strings as in the Tcl 'format' command. E.g.: - <@pre>$obj autoname a%06d + <@pre class='code'> $obj autoname a%06d produces a000000, a000001, a000002, ... } return "newly constructed autoname value" @@ -144,11 +143,10 @@ of assertions, that should be checked on the object automatically. Per default assertion checking is turned off. Examples: - <@pre> - o check {}; # turn off assertion checking on object o - o check all; # turn on all assertion checks on object o - o check {pre post}; # only check pre/post assertions - + <@pre class='code'> + o check {}; <@it># turn off assertion checking on object o + o check all; <@it># turn on all assertion checks on object o + o check {pre post}; <@it># only check pre/post assertions <@a href="#Object-info">info check introspects check options. } return "empty string" @@ -182,11 +180,11 @@ second char) as a method. Every list element until the next '-' is interpreted as a method argument. configure is called before the constructor during initialization and recreation. - E.g.\ - <@pre>Object o -set x 4 - here: - <@pre>o configure -set x 4 - is executed. + E.g. + <@pre class='code'> Object o -set x 4 + here: + <@pre class='code'> o configure -set x 4 + is executed. } return "number of the skipped first arguments" @@ -210,11 +208,10 @@ Standard destructor. Can be overloaded for customized destruction process. Actual destruction is done by instdestroy. "destroy" in principal does: - <@pre> - Object instproc destroy args { - [my info class] instdestroy [self] - } - + <@pre class='code'> + Object instproc destroy args { + [my info class] instdestroy [self] + } } return "empty string" } @@ -319,9 +316,9 @@ See tutorial for detailed examples. } @@ -361,7 +358,7 @@ } { Description { Introspection of objects. The following options can be specified: - <@ul> + <@l> <@li><@TT>objName info args method: Returns the arguments of the specified proc (object specific method). @@ -452,12 +449,11 @@ Description { Binds an variable of the object to the current method's scope. Example: - <@pre> - kitchen proc enter {name} { - my instvar persons - set persons($name) [clock seconds] - } - + <@pre class='code'> + kitchen proc enter {name} { + my instvar persons + set persons($name) [clock seconds] + } Now persons can be accessed as a local variable of the method.<@br> A special syntax is: <@tt> {varName aliasName} . @@ -574,11 +570,12 @@ description { Add a getter/setter for an instance variable with the specified name as a command for the obj. - Example: <@br> - <@tt>Object o<@br> - <@tt>o parametercmd x<@br> - <@tt>o x 100<@br> - <@tt>puts [o x]<@br> + Example: + <@pre class='code'> + Object o + o parametercmd x + o x 100 + puts [o x] } return "empty string" } @@ -588,10 +585,11 @@ description { flag that constructor (method <@tt>init) should not be called. - Example: <@br> - <@tt>Class C<@br> - <@tt>C instproc init {} {puts hu}<@br> - <@tt>C c1 -noinit<@br> + Example: + <@pre class='code'> + Class C + C instproc init {} {puts hu} + C c1 -noinit The object <@tt>c1 will be created without calling the constructor. This can be used to draw a snapshot of an existing object (using the serializer) and to recreate @@ -611,12 +609,15 @@ } { Description { Specify a method in the same style as Tcl specifies procs. - - Optionally assertions may be given. The number of args is either - 3 or 5. + <@br> + Optionally assertions may be specified by two additional arguments. Therefore, to specify only post-assertions an empty pre-assertion list must be given. All assertions are a list of ordinary Tcl conditions. + <@br> + When instproc is called with an empty argument list and an empty + body, the specified instproc is deleted. + } return "empty string" } @@ -629,7 +630,7 @@ qualified name of the method as a list in proc qualifier format: 'objName|classname proc|instproc methodName'. E.g., - <@pre> o procsearch set + <@pre class='code'> o procsearch set returns <@pre>::xotcl::Object instproc set. } return "fully qualified name of the searched method or empty string if not found" @@ -695,8 +696,8 @@ } { Description { When this method is used without the optional level, it is a short form - of the Tcl command
- <@TT>upevel [self callinglevel] command ?args?<@/TT>. + 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. } return "result of the command" @@ -708,8 +709,8 @@ } { Description { When this method is used without the optional level, it is a short form - of the Tcl command
- <@TT>upvar [self callinglevel] othervar localvar ?...?<@/TT>. + 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. } return "result of the command" @@ -791,14 +792,18 @@ mechanism when a class (meta-class) is called with an unknown method. E.g. the following two commands are equivalent - <@pre> Car herby -color red - Car create herby -color red <@/pre> + <@pre class='code'> + Car herby -color red + Car create herby -color red <@/pre> When a users may want to call the constructor <@tt>init before other '-' methods, one can specify '-init' explicitly in the left to right order of the '-' method. Init is called always only once. - e.g.: <@pre> Class Car -init -superclass Vehicle <@/pre> + e.g.: + + <@pre class='code'> Class Car -init -superclass Vehicle <@/pre> + } return "name of the created instance (result of alloc)" } @@ -1014,10 +1019,11 @@ specified name. This method is used for example by the <@A href="#Class-parameter">parameter method. Example: <@br> - <@tt>Class C<@br> - <@tt>C instparametercmd x<@br> - <@tt>C c1 -x 100<@br> - <@tt>puts [c1 x]<@br> + <@pre class='code'> + Class C + C instparametercmd x + C c1 -x 100 + puts [c1 x] } return "empty string" } @@ -1032,11 +1038,14 @@ } { Description { Specify an instance method in the same style as Tcl specifies procs. - - Optionally assertions may be given. The number of args is either 3 or 5. + <@br> + Optionally assertions may be given by two additional arguments. Therefore, to specify only post-assertions an empty pre-assertion list must be given. All assertions are a list of ordinary Tcl conditions. + <@br> + When instproc is called with an empty argument list and an empty + body, the specified instproc is deleted. } return "empty string" } @@ -1047,7 +1056,8 @@ } { description { Convenience method to create an autonamed object. E.g.: - <@pre> Http new + <@pre class='code'> + 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. @@ -1073,12 +1083,11 @@ parameter. It gets and returns the parameter, if no argument is specified. With one argument, the parameter is set to the argument value. - + <@br> Example: - <@pre> + <@pre class='code'> Class Car -parameter {{doors 4} color} - Car herby -doors 2 -color green - <@/pre> + Car herby -doors 2 -color green <@/pre> } return "empty string" } @@ -1089,26 +1098,20 @@ Set the parameter class. The parameter class specifies how parameters are stored and maintained internally. Per default, a method "default" is called, - to set the parameter with a default value. - - I.e., - <@pre> + to set the parameter with a default value. I.e., + <@pre class='code'> Class Car -parameter { {doors 4} - } - <@/pre> + }<@/pre> is a short form for - <@pre> + <@pre class='code'> Class Car -parameter { {doors -default 4} - } - <@/pre> + }<@/pre> For specialized parameter classes other methods can be called, e.g.<@br> - <@pre> - {doors -default 3 -updateWidget car} - <@/pre> + <@pre class='code'> {doors -default 3 -updateWidget car}<@/pre> } return "empty string" } @@ -1147,9 +1150,9 @@ "unknown" (which is found on the Class Object) and executes it. The standard unknown-mechanism of XOTcl calls create with all arguments stepping one step to the right; in the general case: + <@pre class='code'> + ClassName create ClassName ?args?<@/pre> - <@pre>ClassName create ClassName ?args?<@/pre> - Unknown can be overloaded in user-defined subclasses of class. } return "Standard unknown mechanism returns result of create" @@ -1161,8 +1164,8 @@ 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 - <@tt>set x [Object new -volatile] + tcl-proc/object-proc/instproc is left. Example: + <@pre class='code'> set x [Object new -volatile] } return "empty string" } Index: xotcl/doc/tutorial.html =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd --- xotcl/doc/tutorial.html (.../tutorial.html) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/doc/tutorial.html (.../tutorial.html) (revision 2c6cdd4f5d1c45c96e996a70b54ae4c5f46a40fd) @@ -1,10 +1,10 @@ - + XOTcl - Tutorial - +