Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Visual Perl/Tk???

by Anonymous Monk
on Jul 28, 2014 at 17:51 UTC ( #1095400=perlquestion: print w/replies, xml ) Need Help??

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.

Replies are listed 'Best First'.
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 managers

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


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
      > But we are here to help you learn,

      Great! Creative commons CC0 or do I need to mention the source when citing this? ;-)

      Cheers Rolf

      (addicted to the Perl Programming Language and ☆☆☆☆ :)

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

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).
Re: Visual Perl/Tk???
by Anonymous Monk on Jul 28, 2014 at 21:36 UTC
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.
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

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

      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 ;)

        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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1095400]
Approved by AppleFritter
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2020-08-07 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (43 votes). Check out past polls.

    Notices?