diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-12-31 22:58:01 (GMT) |
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-12-31 22:58:01 (GMT) |
| commit | c4f94adb460fd2389bbf4b3db9befcbfb97dae0b (patch) | |
| tree | 8de6a6651f12db3e3b5409c06aca51fc402d01a0 /generic/tclOOScript.h | |
| parent | d4b3d3a460efcdaa6f0ef897a6c3e52b3331e421 (diff) | |
| download | tcl-c4f94adb460fd2389bbf4b3db9befcbfb97dae0b.zip tcl-c4f94adb460fd2389bbf4b3db9befcbfb97dae0b.tar.gz tcl-c4f94adb460fd2389bbf4b3db9befcbfb97dae0b.tar.bz2 | |
Other list-returning [info class] subcommands are plurals, so change property -> properties
Diffstat (limited to 'generic/tclOOScript.h')
| -rw-r--r-- | generic/tclOOScript.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/generic/tclOOScript.h b/generic/tclOOScript.h index e8fd814..9782875 100644 --- a/generic/tclOOScript.h +++ b/generic/tclOOScript.h @@ -297,32 +297,24 @@ static const char *tclOOSetupScript = "\t\t\t\t\t\t}\n" "\t\t\t\t\t}\n" "\t\t\t\t}\n" +"\t\t\t\tset reader <ReadProp$realprop>\n" +"\t\t\t\tset writer <WriteProp$realprop>\n" "\t\t\t\tswitch $kind {\n" "\t\t\t\t\treadable {\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\t$readslot -append $realprop]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\t$writeslot -remove $realprop]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\tmethod <ReadProp$realprop> {} $getter]\n" +"\t\t\t\t\t\tuplevel 2 [list $readslot -append $realprop]\n" +"\t\t\t\t\t\tuplevel 2 [list $writeslot -remove $realprop]\n" +"\t\t\t\t\t\tuplevel 2 [list method $reader -unexport {} $getter]\n" "\t\t\t\t\t}\n" "\t\t\t\t\twritable {\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\t$readslot -remove $realprop]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\t$writeslot -append $realprop]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\tmethod <WriteProp$realprop> {value} $setter]\n" +"\t\t\t\t\t\tuplevel 2 [list $readslot -remove $realprop]\n" +"\t\t\t\t\t\tuplevel 2 [list $writeslot -append $realprop]\n" +"\t\t\t\t\t\tuplevel 2 [list method $writer -unexport {value} $setter]\n" "\t\t\t\t\t}\n" "\t\t\t\t\treadwrite {\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\t$readslot -append $realprop]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\t$writeslot -append $realprop]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\tmethod <ReadProp$realprop> {} $getter]\n" -"\t\t\t\t\t\tuplevel 2 [list \\\n" -"\t\t\t\t\t\t\t\tmethod <WriteProp$realprop> {value} $setter]\n" +"\t\t\t\t\t\tuplevel 2 [list $readslot -append $realprop]\n" +"\t\t\t\t\t\tuplevel 2 [list $writeslot -append $realprop]\n" +"\t\t\t\t\t\tuplevel 2 [list method $reader -unexport {} $getter]\n" +"\t\t\t\t\t\tuplevel 2 [list method $writer -unexport {value} $setter]\n" "\t\t\t\t\t}\n" "\t\t\t\t}\n" "\t\t\t}\n" @@ -333,6 +325,7 @@ static const char *tclOOSetupScript = "\t\t\t\t\t::oo::configuresupport::readableproperties \\\n" "\t\t\t\t\t::oo::configuresupport::writableproperties {*}$args\n" "\t\t\t}\n" +"\t\t\t::proc properties args {::tailcall property {*}$args}\n" "\t\t\t::namespace path ::oo::define\n" "\t\t\t::namespace export property\n" "\t\t}\n" @@ -342,12 +335,13 @@ static const char *tclOOSetupScript = "\t\t\t\t\t::oo::configuresupport::objreadableproperties \\\n" "\t\t\t\t\t::oo::configuresupport::objwritableproperties {*}$args\n" "\t\t\t}\n" +"\t\t\t::proc properties args {::tailcall property {*}$args}\n" "\t\t\t::namespace path ::oo::objdefine\n" "\t\t\t::namespace export property\n" "\t\t}\n" "\t\tproc ReadAll {object my} {\n" "\t\t\tset result {}\n" -"\t\t\tforeach prop [info object property $object -all -readable] {\n" +"\t\t\tforeach prop [info object properties $object -all -readable] {\n" "\t\t\t\ttry {\n" "\t\t\t\t\tdict set result $prop [$my <ReadProp$prop>]\n" "\t\t\t\t} on error {msg opt} {\n" @@ -367,7 +361,7 @@ static const char *tclOOSetupScript = "\t\t\treturn $result\n" "\t\t}\n" "\t\tproc ReadOne {object my propertyName} {\n" -"\t\t\tset props [info object property $object -all -readable]\n" +"\t\t\tset props [info object properties $object -all -readable]\n" "\t\t\tset prop [prefix match -message \"property\" -error [list\\\n" "\t\t\t\t\t-level 2 -errorcode [list \\\n" "\t\t\t\t\t\tTCL LOOKUP INDEX property $propertyName]] \\\n" @@ -390,7 +384,7 @@ static const char *tclOOSetupScript = "\t\t\treturn $value\n" "\t\t}\n" "\t\tproc WriteMany {object my setterMap} {\n" -"\t\t\tset props [info object property $object -all -writable]\n" +"\t\t\tset props [info object properties $object -all -writable]\n" "\t\t\tforeach {prop value} $setterMap {\n" "\t\t\t\tset prop [prefix match -message \"property\" -error [list\\\n" "\t\t\t\t\t-level 2 -errorcode [list \\\n" |
