From: Steve Litt Date: 2005-12-23T15:49:48+09:00 Subject: Re: Ruby version of UMENU On Thursday 22 December 2005 04:51 pm, Gregory Brown wrote: > On 12/22/05, Steve Litt wrote: > > Short answer: I don't know enough about Highline to answer this > > question authoritatively. > > I'm one of the HighLine developers, I was just curious as to what > UMENU did. Now that i've read through the source a little bit > more, my comment was kind of misguided. Still... there are some > interesting points here.... > > > Longer answer: Highline appears to be a programming tool, used > > by a programmer, to quickly assemble the user interface for a > > command line app. > > Yes, that's what it is. > > >UMENU is a program, used by a user, to implement a menu > > system that calls other programs. This menu system can easily > > be assembled with an editor, either in native UMENU .mnu files, > > or in EMDL converted to .mnu. > > Cool. > > > Highline has ALL elements of user interface -- menus, > > picklists, edits, validation. UMENU has only a keystroke driven > > menu, with optional prompted argument substitution, where the > > menu asks the user for an argument and the user types it. > > Gotcha. > > > My impression would be that a programmer would apply Highline > > to one specific program, or a small group of programs. UMENU > > would be applied by a user (granted a literate one) to all the > > programs he/she uses frequently. > > Yes, that's correct. Highline is a programmer's tool. Also, > after reading the source a bit for UMENU, i understand a bit > better what it is used for. Nifty. > > > The advantages of UMENU would be speed of integration and > > minimum debugging, as well as being doable by a mere power > > user. The advantages of Highline would be the ability to craft > > a complete user interface for an app. > > Perhaps HighLine would be helpful for simplifying the code that > makes UMENU work. > This would solve the weak fault tolerance currently in UMENU > without reinventing the wheel. The weak fault tolerant stuff is just that I'm not yet really comfortable with Ruby exceptions. Basically, I need to handle "file not found" exceptions, "not enough command line arguments" exceptions, and "can't write file" exceptions. I'd anticipate it would be no more than 50 lines of code. > > > From what I read about Highline, Highline and UMENU are totally > > different tools that can't really be compared. Indeed, I could > > easily forsee several Highline-enabled apps called from a UMENU > > menu system. > > Yeah, I kind of misjudged the purpose of UMENU when I read > through the source. It does look pretty neat, and would probably > be a great wrapper for HIghLine applications, though building > menus is easy enough to do in pure ruby using our system :) > > I do like the fact that you support a sort of intermediate > configuration setup for menus so an admin or power user can build > them. That's very cool. The real coolness that lies therein is that a single EMDL file can drive a UMENU menu system, a HighLine menu system, an IceWM menu system, etc, so all those menus would have the same structure and choices. So far I've written only EMDL to UMENU, but a simple writer object for each output format would do the trick. > > You might consider offering YAML configuration support, if you > haven't already. I'm not familiar with YAML. What does it stand for, "Yet Another Markup Language" or something like that? What does it do? Thanks SteveT Steve Litt http://www.troubleshooters.com slitt@troubleshooters.com