TclOO Package

Check-in [0e6376f823]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Preparing for 1.0 release (to correspond to Tcl 8.6.0)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 1.0-rc
Files: files | file ages | folders
SHA1: 0e6376f823fb375b37659661edf361c5f4e418fc
User & Date: dkf 2012-11-01 11:07:21
Context
2012-11-01
11:13
Squelch warning. check-in: 365eba4e8c user: dkf tags: 1.0-rc
11:07
Preparing for 1.0 release (to correspond to Tcl 8.6.0) check-in: 0e6376f823 user: dkf tags: 1.0-rc
2012-10-24
08:20
minor correction to index line check-in: 1dde938a35 user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to README.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

92
93
94

95
96
Object Oriented Programming Package for Tcl (TclOO) Version 0.7

Copyright 2005-2012 Donal K. Fellows

License
=======

See the file "license.terms" for the license under which this software is
made available. This file must have been part of the distribution under
which you received this file.

Building
========

TclOO 0.7 uses the TEA3 build system. These instructions are known to work
on Linux, OSX and Windows (with msys installed).

1) Make sure you have a source distribution of Tcl 8.5 somewhere; you will
   need it to build TclOO.


2) Run the configure shell script in this directory. You may well want to
   use the --with-tcl option to tell the script where to find Tcl's build
   descriptor. Using the --prefix option to specify where to install the
   built version is also often useful.

3) Run 'make'.
................................................................................
set sum [summation new]
puts "Start with [$sum value]"
for {set i 1} {$i <= 10} {incr i} {
    puts "Add $i to get [$sum add $i]"
}
summation destroy

Significant Changes from 0.6 Release
====================================
* Small changes that improve things substantially:
    * Forwarded methods resolve in the object's namespace.
    * Added [info object namespace] to get an object's namespace.
    * Added Tcl_GetObjectName() for fetching the name of an object.
  TIP #354 <URL:http://tip.tcl.tk/354.html>
* Made "varname" method work with array elements.
* Added [info object methodtype] and [info class methodtype].
* Converted configuration of lists of things in classes and objects to work as
  slots, implemented as instances of [oo::Slot] class. 
  TIP #380 <URL:http://tip.tcl.tk/380.html>
* Added introspection of call chains and [nextto] for "skipping ahead" in the
  call chain (useful in "diamond inheritance" situations).
  TIP #381 <URL:http://tip.tcl.tk/381.html>
* Improved the [oo::copy] mechanism to allow greater user control.
  TIP #397 <URL:http://tip.tcl.tk/397.html>

Compatibility Warnings
======================
Names of classes, methods or variables that begin with a hyphen can now cause
issues with some definitions (i.e., they are reserved to slotted operations).
The fix is to precede the name with a "--" argument in the problem definition.


The syntax and semantics of the method called "<cloned>" are now defined.


Some types in the C API have changed from 0.6 to better match the Tcl style of
doing things. ABI compatibility is maintained.
|













|



|
>







 







|

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|
>

<
<
>
|
<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
..
63
64
65
66
67
68
69
70
71
72














73
74
75
76
77
78
79
80


81
82

Object Oriented Programming Package for Tcl (TclOO) Version 1.0

Copyright 2005-2012 Donal K. Fellows

License
=======

See the file "license.terms" for the license under which this software is
made available. This file must have been part of the distribution under
which you received this file.

Building
========

TclOO 1.0 uses the TEA3 build system. These instructions are known to work
on Linux, OSX and Windows (with msys installed).

1) Make sure you have a source distribution of Tcl 8.5 somewhere; you will
   need it to build TclOO. (Note that this functionality is incorporated
   directly into Tcl 8.6; you do not need this package with that version.)

2) Run the configure shell script in this directory. You may well want to
   use the --with-tcl option to tell the script where to find Tcl's build
   descriptor. Using the --prefix option to specify where to install the
   built version is also often useful.

3) Run 'make'.
................................................................................
set sum [summation new]
puts "Start with [$sum value]"
for {set i 1} {$i <= 10} {incr i} {
    puts "Add $i to get [$sum add $i]"
}
summation destroy

Significant Changes from 0.7 Release
====================================
None. Just documentation corrections.















Compatibility Warnings
======================
Names of classes, methods or variables that begin with a hyphen can now cause
issues with some definitions (i.e., they are reserved to slotted operations).
The fix is to precede the name with a "--" argument in the problem definition;
see the [oo::define] documentation for the affected definitions.



Method names that are proper multi-element lists are reserved for future
functionality.

Changes to configure.

1
2
3
4
5
6
7
8
9
10
11
...
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
....
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
....
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
....
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
.....
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
.....
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
#! /bin/sh
# From configure.in Revision: 1.41 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for TclOO 0.7.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
................................................................................
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Identity of this package.
PACKAGE_NAME='TclOO'
PACKAGE_TARNAME='tcloo'
PACKAGE_VERSION='0.7'
PACKAGE_STRING='TclOO 0.7'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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 TclOO 0.7 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of TclOO 0.7:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-threads        build with threads
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
TclOO configure 0.7
generated by GNU Autoconf 2.61

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by TclOO $as_me 0.7, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ $0 [email protected]

_ACEOF
exec 5>>config.log
{
................................................................................

exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by TclOO $as_me 0.7, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 [email protected]
................................................................................
$config_headers

Report bugs to <[email protected]>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
TclOO config.status 0.7
configured by $0, generated by GNU Autoconf 2.61,
  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

<

|







 







|
|







 







|







 







|







 







|













|







 







|







 







|







1

2
3
4
5
6
7
8
9
10
...
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
....
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
....
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
....
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
.....
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
.....
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for TclOO 1.0.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
................................................................................
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Identity of this package.
PACKAGE_NAME='TclOO'
PACKAGE_TARNAME='tcloo'
PACKAGE_VERSION='1.0'
PACKAGE_STRING='TclOO 1.0'
PACKAGE_BUGREPORT=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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 TclOO 1.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of TclOO 1.0:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-threads        build with threads
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
TclOO configure 1.0
generated by GNU Autoconf 2.61

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by TclOO $as_me 1.0, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ $0 [email protected]

_ACEOF
exec 5>>config.log
{
................................................................................

exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by TclOO $as_me 1.0, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 [email protected]
................................................................................
$config_headers

Report bugs to <[email protected]>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
TclOO config.status 1.0
configured by $0, generated by GNU Autoconf 2.61,
  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

Changes to configure.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
AC_REVISION($Revision: 1.41 $)
dnl#
dnl# When changing the version number, you *must* change the following:
dnl#	generic/tclOO.h, tests/oo.test, tests/ooNext2.test
dnl#
dnl# You should also change the following:
dnl#	README.txt, win/TclOO.rc
dnl#
AC_INIT([TclOO],[0.7])
AC_CONFIG_AUX_DIR(tclconfig)
AC_CONFIG_HEADERS(config.h)

TEA_INIT([3.9])
TEA_PATH_TCLCONFIG
TEA_LOAD_TCLCONFIG
TEA_PREFIX
<







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dnl#
dnl# When changing the version number, you *must* change the following:
dnl#	generic/tclOO.h, tests/oo.test, tests/ooNext2.test
dnl#
dnl# You should also change the following:
dnl#	README.txt, win/TclOO.rc
dnl#
AC_INIT([TclOO],[1.0])
AC_CONFIG_AUX_DIR(tclconfig)
AC_CONFIG_HEADERS(config.h)

TEA_INIT([3.9])
TEA_PATH_TCLCONFIG
TEA_LOAD_TCLCONFIG
TEA_PREFIX

Changes to generic/tclOO.h.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#   endif
#endif

/*
 * Must match version at top of ../configure.in
 */

#define TCLOO_VERSION "0.7"
#define TCLOO_PATCHLEVEL TCLOO_VERSION

/*
 * These are opaque types.
 */

typedef struct Tcl_Class_ *Tcl_Class;






|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#   endif
#endif

/*
 * Must match version at top of ../configure.in
 */

#define TCLOO_VERSION "1.0"
#define TCLOO_PATCHLEVEL TCLOO_VERSION

/*
 * These are opaque types.
 */

typedef struct Tcl_Class_ *Tcl_Class;

Changes to tests/oo.test.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Copyright (c) 2006-2012 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

package require -exact TclOO 0.7 ;# Must match value in configure.in
if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest 2
    namespace import -force ::tcltest::*
}

testConstraint memory [llength [info commands memory]]
if {[testConstraint memory]} {
    proc getbytes {} {






|
|







4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Copyright (c) 2006-2012 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

package require -exact TclOO 1.0 ;# Must match value in configure.in
if {"::tcltest" ni [namespace children]} {
    package require tcltest 2
    namespace import -force ::tcltest::*
}

testConstraint memory [llength [info commands memory]]
if {[testConstraint memory]} {
    proc getbytes {} {

Changes to tests/ooNext2.test.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Copyright (c) 2010-2011 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

package require -exact TclOO 0.7 ;# Must match value in configure.in
if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest 2
    namespace import -force ::tcltest::*
}

testConstraint memory [llength [info commands memory]]
if {[testConstraint memory]} {
    proc getbytes {} {






|
|







4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Copyright (c) 2010-2011 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

package require -exact TclOO 1.0 ;# Must match value in configure.in
if {"::tcltest" ni [namespace children]} {
    package require tcltest 2
    namespace import -force ::tcltest::*
}

testConstraint memory [llength [info commands memory]]
if {[testConstraint memory]} {
    proc getbytes {} {

Changes to win/TclOO.rc.

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#define ALPHA	0
#define BETA	1
#define RELEASE	2

LANGUAGE 0x9, 0x2
VS_VERSION_INFO VERSIONINFO
    FILEVERSION		0,7,RELEASE,0
    PRODUCTVERSION	0,7,RELEASE,0
    FILEFLAGSMASK	0x3fL
#ifdef DEBUG
    FILEFLAGS	 	VS_FF_DEBUG
#else
    FILEFLAGS	 	0x0L
#endif
    FILEOS		VOS__WINDOWS32
................................................................................
	BEGIN
	    VALUE "FileDescription", PACKAGE_NAME " Tcl Extension"
	    VALUE "OriginalFilename", PKG_LIB_FILE
	    VALUE "InternalName", PACKAGE_NAME
	    VALUE "Author", "Donal K. Fellows"
	    VALUE "CompanyName", "Tcl Core Team"
	    VALUE "FileVersion", PACKAGE_VERSION
	    VALUE "LegalCopyright", "Copyright \251 2005-2008 by Donal K. Fellows"
	    VALUE "ProductName", "Object Orientation Extension Package for Tcl"
	    VALUE "ProductVersion", PACKAGE_VERSION
	END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x809, 1200
    END
END

// Local Variables:
// mode: c++
// End:






|
|







 







|













2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#define ALPHA	0
#define BETA	1
#define RELEASE	2

LANGUAGE 0x9, 0x2
VS_VERSION_INFO VERSIONINFO
    FILEVERSION		1,0,RELEASE,0
    PRODUCTVERSION	1,0,RELEASE,0
    FILEFLAGSMASK	0x3fL
#ifdef DEBUG
    FILEFLAGS	 	VS_FF_DEBUG
#else
    FILEFLAGS	 	0x0L
#endif
    FILEOS		VOS__WINDOWS32
................................................................................
	BEGIN
	    VALUE "FileDescription", PACKAGE_NAME " Tcl Extension"
	    VALUE "OriginalFilename", PKG_LIB_FILE
	    VALUE "InternalName", PACKAGE_NAME
	    VALUE "Author", "Donal K. Fellows"
	    VALUE "CompanyName", "Tcl Core Team"
	    VALUE "FileVersion", PACKAGE_VERSION
	    VALUE "LegalCopyright", "Copyright \251 2005-2012 by Donal K. Fellows"
	    VALUE "ProductName", "Object Orientation Extension Package for Tcl"
	    VALUE "ProductVersion", PACKAGE_VERSION
	END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x809, 1200
    END
END

// Local Variables:
// mode: c++
// End: