Jim Tcl
Check-in [644e0639b5]
Not logged in

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

Overview
Comment:oo: Fix 'methods' for superclasses

Methods inherited from a base class are created with alias, so they are not returned by 'info procs'. Need to use 'info commands' instead.

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:644e0639b5ecd14731ae57ad4982344060b26be5
User & Date: steveb@workware.net.au 2018-06-30 07:24:45
Context
2018-06-30
23:57
Bump version to 0.78 Leaf check-in: 775c8a2b4d user: steveb@workware.net.au tags: trunk
07:24
oo: Fix 'methods' for superclasses

Methods inherited from a base class are created with alias, so they are not returned by 'info procs'. Need to use 'info commands' instead. check-in: 644e0639b5 user: steveb@workware.net.au tags: trunk

2018-06-07
21:13
jim.c: Allow Jim_WrongNumArgs() to accept NULL for msg

For consistency with Tcl

Reported-by: Stuart Cassoff <stwo@bell.net> Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: f971c9f700 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to oo.tcl.

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
		}
	}
	# Other simple class procs
	proc "$classname vars" {} vars { return $vars }
	proc "$classname classvars" {} classvars { return $classvars }
	proc "$classname classname" {} classname { return $classname }
	proc "$classname methods" {} classname {
		lsort [lmap p [info procs "$classname *"] {
			lindex [split $p " "] 1
		}]
	}
	# Pre-defined some instance methods
	$classname method destroy {} { rename $self "" }
	$classname method get {var} { set $var }
	$classname method eval {{locals {}} __code} {







|







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
		}
	}
	# Other simple class procs
	proc "$classname vars" {} vars { return $vars }
	proc "$classname classvars" {} classvars { return $classvars }
	proc "$classname classname" {} classname { return $classname }
	proc "$classname methods" {} classname {
		lsort [lmap p [info commands "$classname *"] {
			lindex [split $p " "] 1
		}]
	}
	# Pre-defined some instance methods
	$classname method destroy {} { rename $self "" }
	$classname method get {var} { set $var }
	$classname method eval {{locals {}} __code} {