You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package require oo
class t {
v1 0
v2 0
}
set v [t new {v1 1 v3 2}]
it generates an unhelpful/confusing error message:
oo.tcl:85: Error: can't read "classname": no such variable
in procedure 't new'
in procedure '::<reference.<t______>.00000000000000000004>' called at file "oo.tcl", line 51
in procedure 't defaultconstructor' called at file "oo.tcl", line 49
at file "oo.tcl", line 68
at file "oo.tcl", line 85
[error] .
talking about "classname" when actually it's a variable name that is the problem (a typo of 'v3' instead of 'v2').
If you do this, you get a more sane response:
. puts [$v get v3]
oo.tcl:92: Error: can't read "v3": no such variable
in procedure '::<reference.<t______>.00000000000000000006>'
in procedure 't get' called at file "oo.tcl", line 49
at file "oo.tcl", line 68
at file "oo.tcl", line 92
[error] .
The text was updated successfully, but these errors were encountered:
With the following:
it generates an unhelpful/confusing error message:
talking about "classname" when actually it's a variable name that is the problem (a typo of 'v3' instead of 'v2').
If you do this, you get a more sane response:
The text was updated successfully, but these errors were encountered: