[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby TUI

Ryan Edwards-Crewe

7/26/2006 4:39:00 PM

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-....

1 Answer

Ryan Edwards-Crewe

7/27/2006 12:54:00 AM

0

>
> Justin

Thanks,

Crewe

--
Posted via http://www.ruby-....