过去一周左右我一直在使用 Ruby Shoes,试图对它有一个很好的介绍。I just started using the list_box but I can't figure out how to code it out so that when a specific choice in a listbox is chosen, something else happens- I couldn't really understand what the manual was trying to do
x=1
list_box :items => ["Repair", "Request"]
在这种情况下,我希望在选择x
时等于 1,在repair
选择时等于 2 request
。我该怎么办?