I wouldn't stuff the title, so here goes a more in-depth explanation: I'd like to replace the following code ...
... with a code that asks for the name of the option that's highlighted. I tried that code (doubting it'd work, and expectedly, it didn't):
I've seen something back in time in the old forums, but now is the first time I actually need it :P
Thanks in advance.
Code:
case @command_window.index
when 0
# execute
when 1
# execute
end
... with a code that asks for the name of the option that's highlighted. I tried that code (doubting it'd work, and expectedly, it didn't):
Code:
case @command_window.commands[index].to_s
when "Option 1"
# execute
when "Option 2"
# execute
end
I've seen something back in time in the old forums, but now is the first time I actually need it :P
Thanks in advance.