Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!gatech!purdue!haven!uvaarpa!mmdf From: marc@athena.mit.edu (Marc Horowitz) Newsgroups: comp.lang.perl Subject: Re: GUI Perl (was Re: Perl for the Macintosh?) Message-ID: <1991Feb20.071734.23428@uvaarpa.Virginia.EDU> Date: 20 Feb 91 07:17:34 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: marc@mit.edu Organization: The Internet Lines: 46 |> >>(Perl with a GUI interface... the mind boggles. ;-) |> > Actually...we have been tinkering with the idea of writing self-contained X |> > widgets and code resources for calling by Perl in order to do just that. |> |> In fact, I am amazed that this has not already been done for Unix, so |> that shell scripts can intelligently interact via gadgets, before now. |> Even if each gadget needs to be/create/whatever a separate window, |> it's still better than almost nothing. |> |> For now, I use a workaround of using "xterm" to create menus, |> selection boxes, and so on and on. Consider, for example, this simple |> popup dialog box, in bourne-shell-ese: |> |> popup_text=`xterm -g 40x2+100+100 -e sh -c 'echo -n "Query: " >/dev/tty |> read answer;echo $answer 1>&3' 3>&1` |> |> I'll leave it as an excersize to interested readers how to hook three |> xterms, two awks, and a shell together to give a simple |> point-and-shoot interface to the Unix filesystem (that is, select a |> file or files upon which to operate in one window (conceptual pane or |> gadget), then select a verb (such as "delete" or "display") in a |> second, and view output in a third). I assure one and all it can be |> fairly easily done. Here we go, off subject again :-) What kind of machine are you using, a Cray? Forking xterms to create menus is, ahh, hardly efficient. If I tried to get away with that my users would have me shot in both kneecaps and dropped off the nearest 20-story building onto a bed of rusty nails. We still have VS2's and MicroVAX II's around here (try getting money to replace > 300 machines which "still work") and this would be a dandy way to make sure that they are even less useable then they are now. |> If anybody else has anymore useful tools that are designed for use |> with shell scripts or even just ideas then I would like to hear from |> you! anonymous ftp from allspice.berkeley.edu:~ftp/tk.tar.Z is a great toolkit for simple X programs which are built using scripts at runtime (despite what you may think, it's still really fast). tk is implemented on top of tcl, which is the same system expect is implemented in. (tclUsenix90.ps and tkUsenix91.ps on allspice are the Usenix papers about tcl and tk, respectively.) Marc