Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am relatively new to Perl, I have used it on and off for a number of years, but never did anything very complicated. I am attempting to create an application for my own use that requires a GUI. I started writing native Perl/Tk, but am becoming a tad overwhelmed, especially with the Geometry managers, I came from an environment where we had tools to create the GUI. I have found and attempted to use several, but most of them require almost as much understanding of Perl/Tk as writing it natively. The only two tools that I have found that seem to do what I want is visual Camel and Eclipse SWT. Camel is unacceptable because it doesn't support very much, and Eclipse SWT appears to generate only Java code. Does anyone know of a free tool that has the functionality of Eclipse SWT, but will generate Perl/tk code? If Eclipse has this functionality, I could not find it. Documentation for most of these type products leave much to be desired. Any help in this direction would be appreciated.
Re: Visual Perl/Tk???
by zentara (Archbishop) on Jul 28, 2014 at 19:08 UTC
|
I started writing native Perl/Tk, but am becoming a tad overwhelmed, especially with the Geometry managersEveryone wants that point and click program for writing GUI's.
For Tk, I think you are out of luck. Gtk2 and Gtk3 have Glade, which is about as close as you will get to your dream of a Visual C/C++ styled IDE.
But we are here to help you learn, I suggest you post your geometry requirements, and see if some monks can offer you some pointers. I find that using Tk::pack() is very easy once you learn the trick of nesting frames and panes.
Going to a Glade type IDE, with it's boilerplate code, and crazy numerical variable names and callbacks, is also difficult.
So post what you want to do, and see if there is a simple way to pack() it all together. You should read Tk Geometry Managers first. The general recomendation is to use pack(), almost always. Grid is alluring, for it's straightforward grid concept, but pack() works better. So when reading the above link, concentrate on pack(), forget the rest.
| [reply] |
|
| [reply] |
Re: Visual Perl/Tk???
by RonW (Parson) on Jul 28, 2014 at 19:04 UTC
|
I have used vptk_w from http://felixl.coolpage.biz/download.html (the one on CPAN is older). I have submitted bug fixes to the author. He is integrating the changes. Not sure when the next release will be made, but the bugs are annoyances.
One bug in particular is that Save sometimes silently fails. Save As, however, works correctly.
Also, while you can build menus widget-by-widget, I have created a module to aid in building menu systems. Currently, it is available here on Perl Monks. I am working on getting on CPAN (waiting on approval of name).
| [reply] |
Re: Visual Perl/Tk???
by aitap (Curate) on Jul 29, 2014 at 09:08 UTC
|
Aside from ZooZ.pl and Glade+Gtk2/Gtk3 (already mentioned) I would like to suggest Prima (which contains its own UI designer) and Qt4 (which can be used with Qt Designer: 1 2). | [reply] |
Re: Visual Perl/Tk???
by Anonymous Monk on Jul 28, 2014 at 21:36 UTC
|
Having a tool won't really help you understand how the geometry managers do their work
Find in below links ZooZ/Guido/TikiArtist/SpecTcl which are available, not sure if its what you want
perl Tk help, RFC: Learning Perl/Tk, Perl/Tk: For Beginners, Re^3: Tkx Search for dialog box for text input , Re: TclTk interface with Perl code, is it possible? , Re^2: GUI toolkit+designer for the perl newbie , Re: Easier GUI, Re: Should I use Perl/TK?, Re^2: need a popup gui stdin, Tk Tree Tutorial ( http://www.rtapo.com/tutorials/tk_tree.html ), some Tkx tutorial links, Tutorial http://theoryx5.uwinnipeg.ca/perltk/ and http://www.perl.com/pub/1999/10/perltk/, http://perltk.org/, http://web.archive.org/web/20100310202528/http://theoryx5.uwinnipeg.ca/perltk/, How to RTFM Tk Tutorials
| [reply] |
Re: Visual Perl/Tk???
by Anonymous Monk on Jul 28, 2014 at 21:14 UTC
|
Perl is really not the right tool for that kind of job, I'm afraid (creating GUIs). Still I've had good success with creating simple GUIs with IUP. | [reply] |
Re: Visual Perl/Tk???
by arh00 (Initiate) on Jul 28, 2014 at 18:57 UTC
|
I posted this and thought I was logged in, apparently not, My name is Alan and I am at arh00@gmx.com
| [reply] |
Re: Visual Perl/Tk???
by james28909 (Deacon) on Jul 30, 2014 at 06:34 UTC
|
yes, i can atest to perl and gui programming, it is ok for small applications/guis, but with small to medium size programs (like 1200 lines of code) that works flawless in console, will make the gui give unexpected results, some of this is prob my fault for not finding the proper documentation, but what looks like something that would work, can very well give unexpected results. like for instance, i use wxperl and have been trying to populate a listctrl with a foreach loop. i have went around in circles trying to accomplish what i need, and i think it is a formatting problem tbh. everything works unless i try wxLC_SORT methods, then it will terminate any color after the first entry. i think you need to assess what you are trying to do first and think if a gui will really help you in the long run. and my best advice, is to read read read :) and the gui tools will only take you so far until you become lost, if you write it out by hand you will know what every function does :) i tried glade and other programs but i didnt liek it much, it was nice to have, but finding examples on the web and documentation on your particular modules yoru trying to use will help you learn about what your doing, and will give you a better sense of accomplishment when your done :)
sorry for the run on sentence lol | [reply] |
|
yes, i can atest to perl and gui programming, it is ok for small applications/guis, but with medium size programs (like 1200 lines of code) that works flawless in console, will make the gui give unexpected results... sorry for the run on sentence lol
blaming the tools isn't a good sign ;)
| [reply] |
|
i wasnt specifically blaming the tools ha :p, i was just saying that it does give unexpected results, just like that listctrl. it works great until i wxLC_SORT_ASCENDING then it terminates any colored entry after the first. seems like it should work either way tbh, but also if you read further into my message i also say that it is probably something i was doing. :) i am not knocking perl or the time these people take to port wxwidgets to perl, to me is great that perl has such an active community behind it. and not to mention how much i enjoy it
| [reply] |
|
|
|
|