From: Michel Date: 2011-09-07T01:29:22+09:00 Subject: Re: TkEntry - how do I read/capture what was typed? --=-4a6BQdTD0JuPMnWTkiMr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit > below is the relevant section of my code > entry1 = TkEntry.new(root) { > } > entry2 = TkEntry.new(root) do > show '*' > end > > variable1 = TkVariable.new > variable2 = TkVariable.new > > entry1.textvariable = variable1 > entry2.textvariable = variable2 > > variable1.value = "" > variable2.value = "Enter any confidential value" > > @myVar = TkVariable.new > @entry1.textvariable(@myVar) #<=givbes undefined method > @myEntry = @myVar.value > > > entry1.place('height' => 25, > 'width' => 150, > 'x' => 10, > 'y' => 10) > > entry2.place('height' => 25, > 'width' => 150, > 'x' => 10, > 'y' => 40) > Tk.mainloop > @entry1 specifies an instance variable in a class and is not defined in your code. Has probably the nil value. I believe that it's not a good design to process the value of an entry field when it has just been typed (if possible with tk ?). Usually, you grab the value when an OK button has been clicked. --=-4a6BQdTD0JuPMnWTkiMr--