From a36dd18cbc9c8b0483c2cefa49f5bbc2bd3b4e73 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Mon, 26 Sep 2011 15:01:36 +1000 Subject: Class vars should take precedence ...over baseclass vars. Signed-off-by: Steve Bennett --- examples/ootest.tcl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples') diff --git a/examples/ootest.tcl b/examples/ootest.tcl index d04951e..d3d48c3 100644 --- a/examples/ootest.tcl +++ b/examples/ootest.tcl @@ -59,6 +59,7 @@ puts "" # Now create a new subclass class CreditAccount Account { limit -1000 + balance -20 } # Override the 'withdraw' method to allow overdrawing CreditAccount method withdraw {amount} { @@ -85,6 +86,7 @@ set b [CreditAccount new {name "John White"}] puts b.vars=[$b vars] puts b.classname=[$b classname] +puts "initial balance -> [$b see]" $b deposit 100 puts "deposit 100 -> [$b see]" -- cgit v1.1