CC: | bug-Tk-Getopt [...] rt.cpan.org |
Subject: | Re: tk:Getopt |
Date: | 19 Jun 2007 23:03:35 +0200 |
To: | "Shaffer, Kip" <shaffer.jd [...] pg.com> |
From: | Slaven Rezic <slaven [...] rezic.de> |
"Shaffer, Kip" <shaffer.jd@pg.com> writes:
Show quoted text
> Slaven,
>
> Thank you for writing Tk:Getopt... it is a very useful module!
>
>
>
> I was wondering if you had any advise on how to allow a user to abort
> out of a the script calling Tk::Getopt.
>
>
>
> One way that I could imagine to do this is if it was possible for the
> calling script to find out which button (OK, Cancel) the user pressed.
>
> Another way would be to assign callback functions to the buttons.
>
>
>
> Would any of these be useful and easily added to Tk::Getopt?
>
Yes, I think this could be added. Maybe it could look like
-some_option_to_be_names => { ok => sub { ... },
cancel => \&cancel_sub,
...
}
Regards,
Slaven
--
Slaven Rezic - slaven <at> rezic <dot> de
tkruler - Perl/Tk program for measuring screen distances
http://ptktools.sourceforge.net/#tkruler