Isaac Toothyxdip wrote:
> number = 1
....
> TkButton.new() {
> command proc { lbl.configure('text'=>"#{number + 1}") }
> }
I rewrite without Tk:
number = 1
q = proc{ number + 1 }
assert{ q.call == 2 }
assert{ q.call == 2 }
Each q.call finds the outer number, adds one, and returns it. So the second
q.call does not appear to do anything "again", such as go to 3.
Try number += 1 !
--
Phlip
http://assert2.rubyforge.org/