From: ts Date: 2004-01-09T20:30:29+09:00 Subject: Re: Call method from a TK object >>>>> "a" == amnesiacx writes: a> $start = TkButton.new { TkButton::new use #instance_eval, this mean that in the the block self is $start a> text 'Start' a> command proc { a> $stop.text "Stop" a> if @@stopped a> @@stopped = FALSE a> tick ruby try to call self.tick i.e. TkButton#tick and not StopWatch#tick, this is why it give an error a> $stop = TkButton.new { a> text 'Stop' a> command proc{ a> text "Zero" a> if @@stopped then a> zero same here, it try to call TkButton#zero and not StopWatch#zero a> text 'Stop' a> end a> @@stopped = TRUE a> } Guy Decoux