From: Alex DeCaria Date: 2007-03-08T23:40:09+09:00 Subject: TkVariables and ".value" method The code below, which puts "Hello" in a label on press of a button, works if the command for the button is { a.value = "Hello" }, but not if it is { a = "Hello" }. I'm trying to understand "why", and can't find anything on the ".value" method in in the Pragmatic Programmers' book on Ruby. Can someone explain why {a = "Hello"} won't work, and why I need to do {a.value = "Hello"?} Thanks in advance. ------------------------------------ require 'tk' root = TkRoot.new.title("Example") a = TkVariable.new Labels = TkLabel.new(root) do textvariable a pack('side' => "top") end TkButton.new(root) do text "Press" command { a.value = "Hello" } pack('side' => "top") end Tk.mainloop ---------------------------- -- Posted via http://www.ruby-forum.com/.