Mailing List

Flat
for the faq simple input
User: rocky
Date: 12/1/2012 12:21 pm
Views: 580
Rating: 0

I have a command line perl program (activestate windows) for which I want to create an enhancement. I want to be able to put up a window asking for 2 input parameters and then when the user wants the program to proceed they push a button to proceed, plus there is a button to cancel and exit the program.

That's it. A small window with 2 input text boxes and 2 buttons. How hard can it be? I was working on this a year ago and never finished it. (Plus then I completely forgot about it.) But recently it occurred to me why I needed a program that did that.  I had tried tk and failed to get it to work propertly. tk is no longer developed. So I don't feel very motivated to try to understand what is wrong.

Is it going to take me MORE than a year to figure out how to do this? :-) That's depressing. Of course I can just pass stuff on the command line but really musn't perl be able to ask for input? I must really be missing something.

Re: for the faq simple input
User: mcholste
Date: 12/1/2012 2:34 pm
Views: 0
Rating: 0
Why not make it an HTML file that uses all local content so you can avoid any GUI nonsense?  Have the script start a simple web server and issue a command to open the URL it serves with the default web browser.

On Saturday, December 1, 2012, wrote:

rocky wrote:

I have a command line perl program (activestate windows) for which I want to create an enhancement. I want to be able to put up a window asking for 2 input parameters and then when the user wants the program to proceed they push a button to proceed, plus there is a button to cancel and exit the program.

That's it. A small window with 2 input text boxes and 2 buttons. How hard can it be? I was working on this a year ago and never finished it. (Plus then I completely forgot about it.) But recently it occurred to me why I needed a program that did that.  I had tried tk and failed to get it to work propertly. tk is no longer developed. So I don't feel very motivated to try to understand what is wrong.

Is it going to take me MORE than a year to figure out how to do this? :-) That's depressing. Of course I can just pass stuff on the command line but really musn't perl be able to ask for input? I must really be missing something.

View Online



Madison Area Perl Mongers - MadMongers
http://www.madmongers.org
Re: for the faq simple input
User: Peter Vereshagin
Date: 12/2/2012 2:44 am
Views: 0
Rating: 0
Hello.

2012/12/01 12:21:16 -0600 chert@rocketmail.com => To peter@vereshagin.org :
> That's it. A small window with 2 input text boxes and 2 buttons. How hard can it be?

As an almost nothing.

> I had tried tk and failed to get it to work propertly. tk is no longer developed.

It's too simple for 'fail to get to work' to be because of 'tk is no longer
developed', isn't it?

> Is it going to take me MORE than a year to figure out how to do this? :-) That's depressing. Of course I can just pass stuff on the command line but really musn't perl be able to ask for input? I must really be missing something.

Something namely: Gtk2.pm, Wx.pm . The latter does exist for ActiveState Perl
as a PPM package.

--
Peter Vereshagin  (http://vereshagin.org) pgp: A0E26627
Re: for the faq simple input
User: rocky
Date: 12/2/2012 8:01 pm
Views: 0
Rating: 0

Yeah you can do it with wx. I don't know how I came up with this much code however. (I must be getting paid per character! :-) But it seems to work. (This is very poor style using global variables. Just a proof of concept.) It is much easier for me to get wx to work than when I tried to use tk.

Re: for the faq simple input
User: rocky
Date: 12/2/2012 8:02 pm
Views: 110
Rating: 0

Well yeah. I was thinking the whole time how "jquery could make this a lot easier". How about an embedded javascript interpretter in perl?

Re: for the faq simple input
User: chrisdolan
Date: 12/2/2012 9:09 pm
Views: 0
Rating: 0
Did you just say "embedded javascript interpreter" and "easier" together? :-)

When I had to do a trivial little GUI for my Windows/ActiveState Perl app back in 2006, I just used Perl/Tk. It was so incredibly easy - start to finish in one day, including learning the Perl/Tk API.
Chris

On Dec 2, 2012, at 8:02 PM, <chert@rocketmail.com> <chert@rocketmail.com> wrote:

rocky wrote:

Well yeah. I was thinking the whole time how "jquery could make this a lot easier". How about an embedded javascript interpretter in perl?

View Online



Madison Area Perl Mongers - MadMongers
http://www.madmongers.org

Re: for the faq simple input
User: rocky
Date: 12/2/2012 9:34 pm
Views: 106
Rating: 0

Ok well why don't you post an example? I must have taken a wrong turn when I took a week and never ended up with anything usable out of tk.

Re: for the faq simple input
User: chrisdolan
Date: 12/3/2012 7:23 am
Views: 0
Rating: 0
Sorry, I can't. I don't own that closed-source project and I haven't done any other Tk projects.
Chris

On Dec 2, 2012, at 9:35 PM, <chert@rocketmail.com> <chert@rocketmail.com> wrote:

rocky wrote:

Ok well why don't you post an example? I must have taken a wrong turn when I took a week and never ended up with anything usable out of tk.

View Online



Madison Area Perl Mongers - MadMongers
http://www.madmongers.org

PreviousNext
Madison Area Perl Mongers