From: Ryan Edwards-crewe Date: 2006-07-27T01:38:45+09:00 Subject: Ruby TUI I'm creating a program with a TUI to then later implement a GUI using TK but for now I'm having trouble coming up with a menu system that works without a whole lot of loops and calls, which is what I have now but its starting to get really messy and confusing, any suggestions. Somthing along the lines of this: Root Menu |-Option1 | |-subOption1 | |-subOption2 | |-Option2 |-Exit main_menu.call #gets and returns menu_option case menu_option when '1' list_pos.call main_menu.call when '2' lookup_menu.call case menu_option when '1' then list_pos.call when 'B' then main_menu.call else $aMenu.error end ... end -- Posted via http://www.ruby-forum.com/.