From: Svend-Erik Madsen Date: 2004-01-09T18:56:40+09:00 Subject: RubyTk variable problem Hi As a RubyTk newbee, I am trying to solve this: I have loaded some fonts into $list, and put it into a listbox, works fine. Then I want to load a selection from the listbox into the variable $font, but cant get it working. This code works fine, printing out to console: $list.curselection.each {|i| p $list.get(i)} This code gives no errors, but $font remains empty: $list.curselection.each {|i| $font = $list.get(i)} And if i do: $list.curselection.each {|i| $font = p $list.get(i)} it prints out to console, but $font remains empty. How do i load the value of $list.get(i) into $font ? /Svend-Erik