perl.tcltk http://www.nntp.perl.org/group/perl.tcltk/ ... Copyright 1998-2016 perl.org Wed, 28 Sep 2016 20:43:31 +0000 ask@perl.org 3rd Call For Papers - 23rd Annual Tcl/Tk Conference (Tcl'2016) by akupries <br/>Hello tcltk-perl, fyi ...<br/><br/>23rd Annual Tcl/Tk Conference (Tcl&#39;2016)<br/>http://www.tcl.tk/community/tcl2016/<br/><br/>November 14 - 18, 2016<br/>Crowne Plaza Houston River Oaks<br/>2712 Southwest Freeway, 77098<br/>Houston, Texas, USA<br/><br/>[[ 7...6...5...4...3...2...1...<br/> Attention! One week to the paper deadline<br/>]]<br/>[[ Attention! Registration is open! Please have a look at<br/> http://www.tcl.tk/community/tcl2016/register.html<br/>]]<br/><br/>[[ Known Speakers<br/>-- Tutorials<br/><br/> * Clif Flynt - GUI Testing with tktest<br/> Introduction to Tcl 1<br/> Introduction to Tcl 2<br/> Tcl on Android<br/><br/> * Joe Mistachkin - Advanced Windows Integration with Eagle, Garuda, and Harpy<br/><br/> * Sean Woods - Advanced TclOO &amp; Megawidgets in TclOO<br/> Building Tcl Extensions<br/> Fun with CoRoutines<br/><br/>]]<br/><br/>Important Dates:<br/><br/>Abstracts and proposals due September 12, 2016<br/>Notification to authors September 19, 2016<br/>WIP and BOF reservations open August 22, 2016<br/>Hotel Room Release October 22, 2016<br/>Author materials due October 24, 2016<br/>Tutorials Start November 14, 2016<br/>Conference starts November 16, 2016<br/><br/>Email Contact: tclconference@googlegroups.com<br/><br/>Submission of Summaries<br/><br/>Tcl/Tk 2016 will be held in Houston, Texas, USA from November 14, 2016 to November 18, 2016.<br/><br/>The program committee is asking for papers and presentation proposals<br/>from anyone using or developing with Tcl/Tk (and extensions). Past<br/>conferences have seen submissions covering a wide variety of topics<br/>including:<br/><br/>* Scientific and engineering applications<br/>* Industrial controls<br/>* Distributed applications and Network Managment<br/>* Object oriented extensions to Tcl/Tk<br/>* New widgets for Tk<br/>* Simulation and application steering with Tcl/Tk<br/>* Tcl/Tk-centric operating environments<br/>* Tcl/Tk on small and embedded devices<br/>* Medical applications and visualization<br/>* Use of different programming paradigms in Tcl/Tk and proposals for new<br/> directions.<br/>* New areas of exploration for the Tcl/Tk language<br/><br/>Note:<br/> We are especially interested in papers for OS X this time, to<br/> complement the keynote.<br/><br/>Submissions should consist of an abstract of about 100 words and a<br/>summary of not more than two pages, and should be sent as plain text<br/>to tclconference@googlegroups.com no later than September 12, 2016. Authors of accepted<br/>abstracts will have until October 24, 2016 to submit their final<br/>paper for the inclusion in the conference proceedings. The proceedings<br/>will be made available on digital media, so extra materials such as<br/>presentation slides, code examples, code for extensions etc. are<br/>encouraged.<br/><br/>Printed proceedings will be produced as an on-demand book at lulu.com<br/><br/>The authors will have 30 minutes to present their paper at<br/>the conference.<br/><br/>The program committee will review and evaluate papers according to the<br/>following criteria:<br/><br/>* Quantity and quality of novel content<br/>* Relevance and interest to the Tcl/Tk community<br/>* Suitability of content for presentation at the conference<br/><br/>Proposals may report on commercial or non-commercial systems, but<br/>those with only blatant marketing content will not be accepted.<br/><br/>Application and experience papers need to strike a balance between<br/>background on the application domain and the relevance of Tcl/Tk to<br/>the application. Application and experience papers should clearly<br/>explain how the application or experience illustrates a novel use of<br/>Tcl/Tk, and what lessons the Tcl/Tk community can derive from the<br/>application or experience to apply to their own development efforts.<br/><br/>Papers accompanied by non-disclosure agreements will be returned to<br/>the author(s) unread. All submissions are held in the highest<br/>confidentiality prior to publication in the Proceedings, both as a<br/>matter of policy and in accord with the U. S. Copyright Act of 1976.<br/><br/>The primary author for each accepted paper will receive registration<br/>to the Technical Sessions portion of the conference at a reduced rate.<br/><br/>Other Forms of Participation<br/><br/>The program committee also welcomes proposals for panel discussions of<br/>up to 90 minutes. Proposals should include a list of confirmed<br/>panelists, a title and format, and a panel description with position<br/>statements from each panelist. Panels should have no more than four<br/>speakers, including the panel moderator, and should allow time for<br/>substantial interaction with attendees. Panels are not presentations<br/>of related research papers.<br/><br/>Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather<br/>sessions (BOFs) are available on a first-come, first-served basis<br/>starting in August 22, 2016. Specific instructions for reserving WIP<br/>and BOF time slots will be provided in the registration information<br/>available in August 22, 2016. Some WIP and BOF time slots will be held open<br/>for on-site reservation. All attendees with an interesting work in<br/>progress should consider reserving a WIP slot.<br/><br/>Registration Information<br/><br/>More information on the conference is available the conference Web<br/>site (http://www.tcl.tk/community/tcl2016/) and will be published on<br/>various Tcl/Tk-related information channels.<br/><br/>To keep in touch with news regarding the conference and Tcl events in<br/>general, subscribe to the tcl-announce list. See:<br/>http://code.activestate.com/lists/tcl-announce to subscribe to the<br/>tcl-announce mailing list.<br/><br/><br/>Conference Committee<br/><br/> * Andreas Kupries Hewlett Packard Enterprise<br/> * Arjen Markus Deltares<br/> * Brian Griffin Mentor Graphics<br/> * Clif Flynt Noumena Corp<br/> * Gerald Lester KnG Consulting LLC<br/> * Joe Mistachkin Mistachkin Systems<br/> * Ronald Fox CAEN Technologies<br/> NSCL @ Michigan State University<br/> * Steve Landers Digital Smarties<br/><br/>Contact Information tclconference@googlegroups.com<br/><br/>Tcl&#39;2016 would like to thank those who are sponsoring the conference:<br/><br/> * ActiveState Inc<br/> * FlightAware<br/> * Mentor Graphics<br/> * Tcl Community Association<br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2016/09/msg696.html Tue, 06 Sep 2016 06:09:40 +0000 RE: facing trouble installing Tkx by Konovalov, Vadim &gt; From: Syed Adnan Haider | Scientific Officer <br/>&gt; <br/>&gt; Hope you are doing good. While trying to install Tkx on my <br/>&gt; UBUNTU 14.04, I am facing following bugs, which are not <br/>&gt; letting me install it. <br/>&gt; <br/>&gt; Here is the error produced while installing, Kindly have a <br/>&gt; look and sugges me some possible workaround or patch in <br/>&gt; order to fix this. Thanks <br/> <br/>As I see it - all these errors could be ignored, you can ignore these errors with &quot;force&quot; flag like this: <br/> <br/> cpan -f -i Tkx <br/> <br/>however you&#39;ve discovered some bug (which will not affect anything crucial, as I hope:) <br/>therefore I&#39;ve made another CPAN release, please try the newer version 1.05, which also includes recent additions from some users. <br/> <br/>regards, <br/>Vadim. <br/> <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg695.html Tue, 28 Jun 2016 17:12:40 +0000 facing trouble installing Tkx by Syed Adnan Haider | Scientific Officer Dear concerned, <br/> <br/>Hope you are doing good. While trying to install Tkx on my UBUNTU 14.04, I am facing following bugs, which are not letting me install it. <br/> <br/>Here is the error produced while installing, Kindly have a look and sugges me some possible workaround or patch in order to fix this. Thanks <br/> <br/>adnan@adnan-Inspiron-N5110[Tkx-1.09] sudo perl Makefile.PL [ 8:46AM] <br/>Writing Makefile for Tkx <br/>Writing MYMETA.yml and MYMETA.json <br/>adnan@adnan-Inspiron-N5110[Tkx-1.09] sudo make [ 8:46AM] <br/>Skip blib/lib/Tkx/Tutorial.pod (unchanged) <br/>Skip blib/lib/Tkx.pm (unchanged) <br/>Skip blib/lib/Tkx/MegaConfig.pm (unchanged) <br/>Skip blib/lib/Tkx/LabEntry.pm (unchanged) <br/>cp tkx-prove blib/script/tkx-prove <br/>/usr/bin/perl -MExtUtils::MY -e &#39;MY-&gt;fixin(shift)&#39; -- blib/script/tkx-prove <br/>cp tkx-ed blib/script/tkx-ed <br/>/usr/bin/perl -MExtUtils::MY -e &#39;MY-&gt;fixin(shift)&#39; -- blib/script/tkx-ed <br/>Manifying blib/man1/tkx-ed.1p <br/>Manifying blib/man3/Tkx::MegaConfig.3pm <br/>Manifying blib/man3/Tkx::LabEntry.3pm <br/>Manifying blib/man3/Tkx::Tutorial.3pm <br/>Manifying blib/man3/Tkx.3pm <br/>adnan@adnan-Inspiron-N5110[Tkx-1.09] sudo make test [ 8:46AM] <br/>PERL_DL_NONLAZY=1 /usr/bin/perl &quot;-MExtUtils::Command::MM&quot; &quot;-e&quot; &quot;test_harness(0, &#39;blib/lib&#39;, &#39;blib/arch&#39;)&quot; t/*.t <br/>t/LabEntry.t ...... 1/2 (in cleanup) Can&#39;t call method &quot;DeleteCommand&quot; on an undefined value at /usr/local/lib/perl/5.18.2/Tcl.pm line 655 during global destruction. <br/>t/LabEntry.t ...... ok <br/>t/mega-config.t ... ok <br/>t/mega.t .......... ok <br/>t/nul-char.t ...... ok <br/>t/tcl-callback.t .. 1/7 (in cleanup) Can&#39;t call method &quot;DeleteCommand&quot; on an undefined value at /usr/local/lib/perl/5.18.2/Tcl.pm line 655 during global destruction. <br/>t/tcl-callback.t .. ok <br/>t/tcl.t ........... 1/18 # Test 18 got: &quot;Tcl error &#39;Foo at /usr/local/lib/perl/5.18.2/Tcl.pm line 585.\n&#39; while invoking scalar result call:\n\t\&quot;error Foo\&quot; at /usr/local/lib/perl/5.18.2/Tcl.pm line 588.\n\tTcl::call(&#39;Tcl=SCALAR(0x1b2ce48)&#39;, &#39;error&#39;, &#39;Foo&#39;) called at /media/windows/NGS/GATK_FINAL_PIPELINE/PrimerMapper-master/Tkx-1.09/blib/lib/Tkx.pm line 329\n\teval {...} called at /media/windows/NGS/GATK_FINAL_PIPELINE/PrimerMapper-master/Tkx-1.09/blib/lib/Tkx.pm line 329\n\tTkx::i::call(&#39;error&#39;, &#39;Foo&#39;) called at /media/windows/NGS/GATK_FINAL_PIPELINE/PrimerMapper-master/Tkx-1.09/blib/lib/Tkx.pm line 51\n\tTkx::AUTOLOAD(&#39;Foo&#39;) called at t/tcl.t line 38\n\teval {...} called at t/tcl.t line 38\n&quot; (t/tcl.t at line 39) <br/># Expected: &quot;Foo at t/tcl.t line 38.\n&quot; <br/># t/tcl.t line 39 is: ok($@, &quot;Foo at @{[__FILE__]} line @{[__LINE__ - 1]}.\n&quot;); <br/>t/tcl.t ........... Failed 1/18 subtests <br/>t/tk.t ............ 12/12 (in cleanup) Can&#39;t call method &quot;DeleteCommand&quot; on an undefined value at /usr/local/lib/perl/5.18.2/Tcl.pm line 655 during global destruction. <br/>t/tk.t ............ ok <br/>t/utf8.t .......... ok <br/> <br/>Test Summary Report <br/>------------------- <br/>t/tcl.t (Wstat: 0 Tests: 18 Failed: 1) <br/> Failed test: 18 <br/>Files=8, Tests=54, 9 wallclock secs ( 0.15 usr 0.03 sys + 1.85 cusr 0.31 csys = 2.34 CPU) <br/>Result: FAIL <br/>Failed 1/8 test programs. 1/54 subtests failed. <br/>make: *** [test_dynamic] Error 255 <br/> <br/> <br/> <br/>Thanks and Best Regards, <br/>Syed Adnan Haider <br/>Scientific Officer | Rehman Medical Institute | Hayatabad Peshawar <br/>UAN: 111-REH-MAN (734-626) |Tel: +92-91-5838 000 (ext. 5027) | Fax: +92-91-5838 333 <br/>Doctor&#146;s Appointment: +92-91-5838 666 <br/>www.rmi.edu.pk <br/>DISCLAIMER: &#147;The information and any attachments in this email are confidential and intended solely for the use of the addressee. If you are not the intended recipient please notify sender. Any disclosure, copying, distribution or taking any action in reliance of the contents of this information may be unlawful. Rehman Medical Institute (RMI) is neither liable for the proper and complete transmission of the content nor for any delay in its receipt. Any views or opinions presented in this email are those of the author and do not necessarily represent those of RMI. Finally, although this message has been scanned the recipient should check this email and any attachments for the presence of viruses. RMI accepts no liability for any damage caused by this email.&#148; <br/> http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg694.html Tue, 28 Jun 2016 16:12:45 +0000 RE: Simple ok/cancel routine by Philip Brady Thanks for the replies - most helpful. <br/>Phil <br/> <br/> <br/>&gt; From: dbecoll@gmail.com <br/>&gt; Subject: Re: Simple ok/cancel routine <br/>&gt; To: phil.brady@hotmail.co.uk <br/>&gt; Date: Tue, 14 Jun 2016 21:42:09 -0700 <br/>&gt; <br/>&gt; On 6/14/2016 10:29, Philip Brady wrote: <br/>&gt; &gt; <br/>&gt; &gt; I&#39;m writing a perl script using Tk and have had some success but I wish to have a very simple subroutine to ask the user a question and get a response &#39;ok&#39; or &#39;cancel&#39;. <br/>&gt; &gt; <br/>&gt; &gt; My routine follows but it doesn&#39;t quite work as expected. <br/>&gt; &gt; It&#39;s fine if I mouse click on &#39;ok&#39; or simply press the return key - it correctly returns &#39;ok&#39;. <br/>&gt; &gt; If I clink &#39;cancel&#39; it correctly returns &#39;cancel&#39;. <br/>&gt; &gt; <br/>&gt; &gt; Unfortunately, if I tab to &#39;cancel&#39; then press return it returns &#39;ok&#39; rather than the desired &#39;cancel&#39;. <br/>&gt; <br/>&gt; Try space instead of return. Notice the dotted frame moves when you tab, but <br/>&gt; the sunken background is only on the OK button. The default button for enter <br/>&gt; is the first button or the one specified as default. <br/> = http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg693.html Wed, 15 Jun 2016 10:35:15 +0000 Re: Simple ok/cancel routine by Jason McVeigh Jason McVeigh wrote: <br/>&gt; ATTN: Phillip Bradey RE: Tk Options <br/>&gt; <br/>&gt; #!/bin/perl -w <br/>&gt; <br/>&gt; package Application { <br/>&gt; use Moose; <br/>&gt; <br/>&gt; use Tk; <br/>&gt; require Tk::BrowseEntry; <br/>&gt; <br/>&gt; use feature &#39;say&#39;; <br/>&gt; use feature &#39;state&#39;; <br/>&gt; use feature &#39;switch&#39;; <br/>&gt; <br/>&gt; use namespace::autoclean; <br/>&gt; <br/>&gt; has &#39;_mw&#39; =&gt; ( <br/>&gt; is =&gt; &#39;rw&#39;, <br/>&gt; isa =&gt; &#39;Tk::MainWindow&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; has &#39;_packdirs&#39; =&gt; ( <br/>&gt; is =&gt; &#39;rw&#39;, <br/>&gt; isa =&gt; &#39;ArrayRef&#39;, <br/>&gt; required =&gt; 1, <br/>&gt; default =&gt; sub { [] }, <br/>&gt; ); <br/>&gt; <br/>&gt; has &#39;_top&#39; =&gt; ( <br/>&gt; is =&gt; &#39;rw&#39;, <br/>&gt; isa =&gt; &#39;Tk::Widget&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; sub _build_mw { <br/>&gt; my ($self) = @_; <br/>&gt; my $numWidgets = 4; <br/>&gt; <br/>&gt; $self-&gt;_mw(MainWindow-&gt;new(-title =&gt; &quot;Tk Options&quot;)); <br/>&gt; <br/>&gt; my $ft1 = $self-&gt;_mw-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39;, <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;top&#39;, <br/>&gt; -fill =&gt; &#39;y&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $f1 = $ft1-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $f2 = $ft1-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $f3 = $ft1-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $f4 = $ft1-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; <br/>&gt; my $ft2 = $self-&gt;_mw-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39;, <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;bottom&#39;, <br/>&gt; -fill =&gt; &#39;y&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $f5 = $ft2-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; <br/>&gt; ); <br/>&gt; <br/>&gt; my $f6 = $ft2-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; -fill =&gt; &#39;x&#39; <br/>&gt; ); <br/>&gt; <br/>&gt; my $f7 = $ft2-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $f8 = $ft2-&gt;Frame( <br/>&gt; -borderwidth =&gt; 2, <br/>&gt; -relief =&gt; &#39;groove&#39; <br/>&gt; )-&gt;pack( <br/>&gt; -side =&gt; &#39;left&#39;, <br/>&gt; ); <br/>&gt; <br/>&gt; my $i = 0; <br/>&gt; <br/>&gt; my $lbl1 = $f1-&gt;Label(-text =&gt; &#39;Configuration 1&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl2 = $f2-&gt;Label(-text =&gt; &#39;Configuration 2&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl3 = $f3-&gt;Label(-text =&gt; &#39;Configuration 3&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl4 = $f4-&gt;Label(-text =&gt; &#39;Configuration 4&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl5 = $f5-&gt;Label(-text =&gt; &#39;Configuration 5&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl6 = $f6-&gt;Label(-text =&gt; &#39;Configuration 6&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl7 = $f7-&gt;Label(-text =&gt; &#39;Configuration 7&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; my $lbl8 = $f8-&gt;Label(-text =&gt; &#39;Configuration 8&#39;)-&gt;pack(-ipady <br/>&gt; =&gt; 5); <br/>&gt; <br/>&gt; foreach (0..$numWidgets) <br/>&gt; { <br/>&gt; $self-&gt;_packdirs-&gt;[$_] = &#39;Skip&#39;; <br/>&gt; my $be1 = $f1-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be2 = $f2-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be3 = $f3-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be4 = $f4-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be5 = $f5-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be6 = $f6-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be7 = $f7-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; my $be9 = $f8-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/>&gt; -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/>&gt; -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>&gt; \&amp;repack) <br/>&gt; -&gt;pack(-ipady =&gt; 5); <br/>&gt; } <br/>&gt; <br/>&gt; my $btn1 = $f1-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 1&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn2 = $f2-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 2&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn3 = $f3-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 3&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn4 = $f4-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 4&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn5 = $f5-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 5&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn6 = $f6-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 6&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn7 = $f7-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 7&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; my $btn8 = $f8-&gt;Button(-text =&gt; &#39;Commence New Process <br/>&gt; 8&#39;)-&gt;pack(-ipady =&gt; 5); <br/>&gt; <br/>&gt; $self-&gt;_top($self-&gt;_mw-&gt;Toplevel(-title =&gt; &quot;output window&quot;)); <br/>&gt; <br/>&gt; my $c; <br/>&gt; <br/>&gt; my $idx = 0; <br/>&gt; foreach (@{$self-&gt;_packdirs}) <br/>&gt; { <br/>&gt; my $b = $self-&gt;_top-&gt;Button(-text =&gt; &quot;Open Folder <br/>&gt; ${idx}&quot;, -font =&gt; &quot;Courier 20 bold&quot;)-&gt;pack(-side =&gt; &#39;bottom&#39;, -fill =&gt; <br/>&gt; &#39;both&#39;, -expand =&gt; 1); <br/>&gt; $idx++; <br/>&gt; } <br/>&gt; <br/>&gt; MainLoop; <br/>&gt; } <br/>&gt; <br/>&gt; sub main { <br/>&gt; my ($self) = @_; <br/>&gt; $self-&gt;_build_mw; <br/>&gt; } <br/>&gt; <br/>&gt; __PACKAGE__-&gt;meta-&gt;make_immutable; <br/>&gt; } <br/>&gt; <br/>&gt; my $app = Application-&gt;new-&gt;main unless caller; <br/>&gt; <br/>&gt; 1; <br/>&gt; <br/>&gt; Great. This is also available as a Public Gist upon GitHub. The url <br/>&gt; for the Gist is <br/>&gt; <br/>&gt; https://gist.github.com/jmcveigh/48c71a3b555eea631a00c13e9162c433 <br/>&gt; <br/>&gt; Click link above for the source code response regarding options in Tk. <br/>&gt; <br/>&gt; Okay. <br/>&gt; <br/>&gt; Warm Regards, <br/>&gt; Jason McVeigh <br/>&gt; Jeff Hobbs wrote: <br/>&gt;&gt; I believe &lt;Return&gt; may be the default action, where &lt;Space&gt; is what <br/>&gt;&gt; you need to press to get the right action. You&acirc;&#128;&#153;ll see OS X behave the <br/>&gt;&gt; same way with its core ok/cancel boxes. <br/>&gt;&gt; <br/>&gt;&gt;&gt; On Jun 14, 2016, at 10:29 AM, Philip Brady &lt;phil.brady@hotmail.co.uk <br/>&gt;&gt;&gt; &lt;mailto:phil.brady@hotmail.co.uk&gt;&gt; wrote: <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; I&#39;m writing a perl script using Tk and have had some success but I <br/>&gt;&gt;&gt; wish to have a very simple subroutine to ask the user a question and <br/>&gt;&gt;&gt; get a response &#39;ok&#39; or &#39;cancel&#39;. <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; My routine follows but it doesn&#39;t quite work as expected. <br/>&gt;&gt;&gt; It&#39;s fine if I mouse click on &#39;ok&#39; or simply press the return key - <br/>&gt;&gt;&gt; it correctly returns &#39;ok&#39;. <br/>&gt;&gt;&gt; If I clink &#39;cancel&#39; it correctly returns &#39;cancel&#39;. <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; Unfortunately, if I tab to &#39;cancel&#39; then press return it returns <br/>&gt;&gt;&gt; &#39;ok&#39; rather than the desired &#39;cancel&#39;. <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; I&#39;d appreciate any advice on fixing this. <br/>&gt;&gt;&gt; regards <br/>&gt;&gt;&gt; Phil <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; The code is: <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; #!/usr/bin/perl -w <br/>&gt;&gt;&gt; use strict; <br/>&gt;&gt;&gt; use Tk; <br/>&gt;&gt;&gt; use Tk::Dialog; <br/>&gt;&gt;&gt; use Tk::DialogBox; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; my $main=MainWindow-&gt;new(); <br/>&gt;&gt;&gt; my $X=CheckOk(&#39;Some old question&#39;); <br/>&gt;&gt;&gt; print &quot;Response was $X\n&quot;; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; exit 0; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; sub CheckOk{ <br/>&gt;&gt;&gt; (my $question)=@_; <br/>&gt;&gt;&gt; my $box=$main-&gt;DialogBox( <br/>&gt;&gt;&gt; -buttons =&gt; [&#39;ok&#39;,&#39;cancel&#39;], <br/>&gt;&gt;&gt; -default_button =&gt; &quot;ok&quot;); <br/>&gt;&gt;&gt; $box-&gt; add(&quot;Label&quot;, <br/>&gt;&gt;&gt; -text =&gt; &quot;$question &quot;)-&gt;pack; <br/>&gt;&gt;&gt; $box -&gt; Show(); <br/>&gt;&gt;&gt; } <br/>&gt;&gt; <br/>&gt; <br/>ATTN: Philip Brady RE: Tk Options <br/> <br/>Hi. I thought I would log a bit more time on this piece. I did some <br/>more on my topic. This is an abstract for Tk Options. <br/> <br/>#!/bin/perl -w <br/> <br/>package Application { <br/> use Moose; <br/> <br/> use Tk; <br/> require Tk::BrowseEntry; <br/> <br/> use feature &#39;say&#39;; <br/> use feature &#39;state&#39;; <br/> use feature &#39;switch&#39;; <br/> <br/> use namespace::autoclean; <br/> <br/> has &#39;_mw&#39; =&gt; ( <br/> is =&gt; &#39;rw&#39;, <br/> isa =&gt; &#39;Tk::MainWindow&#39;, <br/> ); <br/> <br/> has &#39;_packdirs&#39; =&gt; ( <br/> is =&gt; &#39;rw&#39;, <br/> isa =&gt; &#39;ArrayRef&#39;, <br/> required =&gt; 1, <br/> default =&gt; sub { [] }, <br/> ); <br/> <br/> has &#39;_top&#39; =&gt; ( <br/> is =&gt; &#39;rw&#39;, <br/> isa =&gt; &#39;Tk::Widget&#39;, <br/> ); <br/> <br/> has &#39;_fh&#39; =&gt; ( <br/> is =&gt; &#39;ro&#39;, <br/> isa =&gt; &#39;ArrayRef[Tk::Frame]&#39;, <br/> default =&gt; sub { [] }, <br/> ); <br/> <br/> has &#39;_f&#39; =&gt; ( <br/> is =&gt; &#39;ro&#39;, <br/> isa =&gt; &#39;ArrayRef[Tk::Frame]&#39;, <br/> default =&gt; sub { [] }, <br/> ); <br/> <br/> use YAML::Tiny; <br/> <br/> sub _build_mw { <br/> my ($self) = @_; <br/> my $numWidgets = 4; <br/> <br/> my $yaml = YAML::Tiny-&gt;read(&#39;tk-options-labels.yml&#39;); <br/> <br/> $self-&gt;_mw(MainWindow-&gt;new(-title =&gt; &quot;Tk Options&quot;)); <br/> <br/> # create top, bottom, left and right frames <br/> <br/> my %def_fh1 = ( <br/> &#39;side&#39; =&gt; &#39;top&#39;, &#39;fill&#39; =&gt; &#39;y&#39;,&#39;cells&#39; =&gt; 3, <br/> ); <br/> <br/> my %def_fh2 = ( <br/> &#39;side&#39; =&gt; &#39;bottom&#39;, &#39;fill&#39; =&gt; &#39;y&#39;,&#39;cells&#39; =&gt; 3, <br/> ); <br/> <br/> my %def_fh3 = ( <br/> &#39;side&#39; =&gt; &#39;left&#39;, &#39;fill&#39; =&gt; &#39;x&#39;,&#39;cells&#39; =&gt; 1, <br/> ); <br/> <br/> my %def_fh4 = ( <br/> &#39;side&#39; =&gt; &#39;right&#39;, &#39;fill&#39; =&gt; &#39;x&#39;,&#39;cells&#39; =&gt; 1, <br/> ); <br/> <br/> my @def_fh = (\%def_fh1,\%def_fh2,\%def_fh3,\%def_fh4); <br/> <br/> my ($idx_fh, $idx_f, $idx_be) = (0,0,0); <br/> <br/> # create widgits within top and bottom frames <br/> for (0 .. 3) { <br/> <br/> push @{$self-&gt;_fh}, $self-&gt;_mw-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39;, <br/> )-&gt;pack( <br/> -side =&gt; $def_fh[$idx_fh]{&#39;side&#39;}, <br/> -fill =&gt; $def_fh[$idx_fh]{&#39;fill&#39;}, <br/> ); <br/> <br/> say $def_fh[$idx_fh]{&#39;side&#39;}; <br/> for (0 .. $def_fh[$idx_fh]{&#39;cells&#39;}) { <br/> push @{$self-&gt;_f}, $self-&gt;_fh-&gt;[$idx_fh]-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> $self-&gt;_f-&gt;[$idx_f]-&gt;Label(-text =&gt; <br/>$yaml-&gt;[0]-&gt;[$idx_f]-&gt;{&#39;header&#39;})-&gt;pack(-ipady =&gt; 5); <br/> <br/> for (0 .. 5) { <br/> $self-&gt;_packdirs-&gt;[$idx_be] = &#39;Skip&#39;; <br/> $self-&gt;_f-&gt;[$idx_f]-&gt;BrowseEntry(-label =&gt; <br/>$yaml-&gt;[0]-&gt;[$idx_f]-&gt;{&#39;options&#39;}-&gt;[$_], <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$idx_be], <br/>-browsecmd =&gt; \&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> $idx_be++; <br/> } <br/> <br/> $self-&gt;_f-&gt;[$idx_f]-&gt;Button(-text =&gt; <br/>$yaml-&gt;[0]-&gt;[$idx_f]-&gt;{&#39;cta&#39;})-&gt;pack(-ipady =&gt; 5); <br/> $idx_f++; <br/> } <br/> $idx_fh++; <br/> } <br/> <br/> $self-&gt;_top($self-&gt;_mw-&gt;Toplevel(-title =&gt; &quot;File Options&quot;)); <br/> <br/> my $c; <br/> <br/> my $idx = 0; <br/> foreach (0 .. 8) <br/> { <br/> my $b = $self-&gt;_top-&gt;Button(-text =&gt; &quot;Open Folder ${idx}&quot;, <br/>-font =&gt; &quot;Courier 20 bold&quot;)-&gt;pack(-side =&gt; &#39;bottom&#39;, -fill =&gt; &#39;both&#39;, <br/>-expand =&gt; 1); <br/> $idx++; <br/> } <br/> <br/> MainLoop; <br/> } <br/> <br/> sub main { <br/> my ($self) = @_; <br/> $self-&gt;_build_mw; <br/> } <br/> <br/> __PACKAGE__-&gt;meta-&gt;make_immutable; <br/>} <br/> <br/>my $app = Application-&gt;new-&gt;main unless caller; <br/> <br/>1; <br/> <br/>__YAML__ <br/>- header: Command 1 <br/> cta: Process 1 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 2 <br/> cta: Process 2 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 3 <br/> cta: Process 3 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 - Option 4 <br/> - Option 5 <br/>- header: Command 4 <br/> cta: Process 4 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 5 <br/> cta: Process 5 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 6 <br/> cta: Process 6 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 7 <br/> cta: Process 7 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 8 <br/> cta: Process 8 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 9 <br/> cta: Process 9 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 10 <br/> cta: Process 10 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 11 <br/> cta: Process 11 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/>- header: Command 12 <br/> cta: Process 12 <br/> options: <br/> - Option 1 <br/> - Option 2 <br/> - Option 3 <br/> - Option 4 <br/> - Option 5 <br/> <br/> <br/>Also, there is a Gist upon GitHub. The link is : <br/>https://gist.github.com/jmcveigh/cee40862fd4f4b545576cc59184f44b5 <br/>Warm regards, <br/>Jason McVeigh <br/> http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg692.html Wed, 15 Jun 2016 00:42:50 +0000 Re: Simple ok/cancel routine by Jason McVeigh ATTN: Phillip Bradey RE: Tk Options <br/> <br/>#!/bin/perl -w <br/> <br/>package Application { <br/> use Moose; <br/> <br/> use Tk; <br/> require Tk::BrowseEntry; <br/> <br/> use feature &#39;say&#39;; <br/> use feature &#39;state&#39;; <br/> use feature &#39;switch&#39;; <br/> <br/> use namespace::autoclean; <br/> <br/> has &#39;_mw&#39; =&gt; ( <br/> is =&gt; &#39;rw&#39;, <br/> isa =&gt; &#39;Tk::MainWindow&#39;, <br/> ); <br/> <br/> has &#39;_packdirs&#39; =&gt; ( <br/> is =&gt; &#39;rw&#39;, <br/> isa =&gt; &#39;ArrayRef&#39;, <br/> required =&gt; 1, <br/> default =&gt; sub { [] }, <br/> ); <br/> <br/> has &#39;_top&#39; =&gt; ( <br/> is =&gt; &#39;rw&#39;, <br/> isa =&gt; &#39;Tk::Widget&#39;, <br/> ); <br/> <br/> sub _build_mw { <br/> my ($self) = @_; <br/> my $numWidgets = 4; <br/> <br/> $self-&gt;_mw(MainWindow-&gt;new(-title =&gt; &quot;Tk Options&quot;)); <br/> <br/> my $ft1 = $self-&gt;_mw-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39;, <br/> )-&gt;pack( <br/> -side =&gt; &#39;top&#39;, <br/> -fill =&gt; &#39;y&#39;, <br/> ); <br/> <br/> my $f1 = $ft1-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> my $f2 = $ft1-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> my $f3 = $ft1-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> my $f4 = $ft1-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> <br/> my $ft2 = $self-&gt;_mw-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39;, <br/> )-&gt;pack( <br/> -side =&gt; &#39;bottom&#39;, <br/> -fill =&gt; &#39;y&#39;, <br/> ); <br/> <br/> my $f5 = $ft2-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> <br/> ); <br/> <br/> my $f6 = $ft2-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> -fill =&gt; &#39;x&#39; <br/> ); <br/> <br/> my $f7 = $ft2-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> my $f8 = $ft2-&gt;Frame( <br/> -borderwidth =&gt; 2, <br/> -relief =&gt; &#39;groove&#39; <br/> )-&gt;pack( <br/> -side =&gt; &#39;left&#39;, <br/> ); <br/> <br/> my $i = 0; <br/> <br/> my $lbl1 = $f1-&gt;Label(-text =&gt; &#39;Configuration 1&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl2 = $f2-&gt;Label(-text =&gt; &#39;Configuration 2&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl3 = $f3-&gt;Label(-text =&gt; &#39;Configuration 3&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl4 = $f4-&gt;Label(-text =&gt; &#39;Configuration 4&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl5 = $f5-&gt;Label(-text =&gt; &#39;Configuration 5&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl6 = $f6-&gt;Label(-text =&gt; &#39;Configuration 6&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl7 = $f7-&gt;Label(-text =&gt; &#39;Configuration 7&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> my $lbl8 = $f8-&gt;Label(-text =&gt; &#39;Configuration 8&#39;)-&gt;pack(-ipady <br/>=&gt; 5); <br/> <br/> foreach (0..$numWidgets) <br/> { <br/> $self-&gt;_packdirs-&gt;[$_] = &#39;Skip&#39;; <br/> my $be1 = $f1-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be2 = $f2-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be3 = $f3-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be4 = $f4-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be5 = $f5-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be6 = $f6-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be7 = $f7-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> <br/> my $be9 = $f8-&gt;BrowseEntry(-label =&gt; &quot;Setting $_:&quot;, <br/> -choices =&gt; [&quot;On&quot;, &quot;Off&quot;, &quot;Skip&quot;], <br/> -variable =&gt; \$self-&gt;_packdirs-&gt;[$_], -browsecmd =&gt; <br/>\&amp;repack) <br/> -&gt;pack(-ipady =&gt; 5); <br/> } <br/> <br/> my $btn1 = $f1-&gt;Button(-text =&gt; &#39;Commence New Process <br/>1&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn2 = $f2-&gt;Button(-text =&gt; &#39;Commence New Process <br/>2&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn3 = $f3-&gt;Button(-text =&gt; &#39;Commence New Process <br/>3&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn4 = $f4-&gt;Button(-text =&gt; &#39;Commence New Process <br/>4&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn5 = $f5-&gt;Button(-text =&gt; &#39;Commence New Process <br/>5&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn6 = $f6-&gt;Button(-text =&gt; &#39;Commence New Process <br/>6&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn7 = $f7-&gt;Button(-text =&gt; &#39;Commence New Process <br/>7&#39;)-&gt;pack(-ipady =&gt; 5); <br/> my $btn8 = $f8-&gt;Button(-text =&gt; &#39;Commence New Process <br/>8&#39;)-&gt;pack(-ipady =&gt; 5); <br/> <br/> $self-&gt;_top($self-&gt;_mw-&gt;Toplevel(-title =&gt; &quot;output window&quot;)); <br/> <br/> my $c; <br/> <br/> my $idx = 0; <br/> foreach (@{$self-&gt;_packdirs}) <br/> { <br/> my $b = $self-&gt;_top-&gt;Button(-text =&gt; &quot;Open Folder ${idx}&quot;, <br/>-font =&gt; &quot;Courier 20 bold&quot;)-&gt;pack(-side =&gt; &#39;bottom&#39;, -fill =&gt; &#39;both&#39;, <br/>-expand =&gt; 1); <br/> $idx++; <br/> } <br/> <br/> MainLoop; <br/> } <br/> <br/> sub main { <br/> my ($self) = @_; <br/> $self-&gt;_build_mw; <br/> } <br/> <br/> __PACKAGE__-&gt;meta-&gt;make_immutable; <br/>} <br/> <br/>my $app = Application-&gt;new-&gt;main unless caller; <br/> <br/>1; <br/> <br/>Great. This is also available as a Public Gist upon GitHub. The url <br/>for the Gist is <br/> <br/>https://gist.github.com/jmcveigh/48c71a3b555eea631a00c13e9162c433 <br/> <br/>Click link above for the source code response regarding options in Tk. <br/> <br/>Okay. <br/> <br/>Warm Regards, <br/>Jason McVeigh <br/>Jeff Hobbs wrote: <br/>&gt; I believe &lt;Return&gt; may be the default action, where &lt;Space&gt; is what <br/>&gt; you need to press to get the right action. You&acirc;&#128;&#153;ll see OS X behave the <br/>&gt; same way with its core ok/cancel boxes. <br/>&gt; <br/>&gt;&gt; On Jun 14, 2016, at 10:29 AM, Philip Brady &lt;phil.brady@hotmail.co.uk <br/>&gt;&gt; &lt;mailto:phil.brady@hotmail.co.uk&gt;&gt; wrote: <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; I&#39;m writing a perl script using Tk and have had some success but I <br/>&gt;&gt; wish to have a very simple subroutine to ask the user a question and <br/>&gt;&gt; get a response &#39;ok&#39; or &#39;cancel&#39;. <br/>&gt;&gt; <br/>&gt;&gt; My routine follows but it doesn&#39;t quite work as expected. <br/>&gt;&gt; It&#39;s fine if I mouse click on &#39;ok&#39; or simply press the return key - <br/>&gt;&gt; it correctly returns &#39;ok&#39;. <br/>&gt;&gt; If I clink &#39;cancel&#39; it correctly returns &#39;cancel&#39;. <br/>&gt;&gt; <br/>&gt;&gt; Unfortunately, if I tab to &#39;cancel&#39; then press return it returns &#39;ok&#39; <br/>&gt;&gt; rather than the desired &#39;cancel&#39;. <br/>&gt;&gt; <br/>&gt;&gt; I&#39;d appreciate any advice on fixing this. <br/>&gt;&gt; regards <br/>&gt;&gt; Phil <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; The code is: <br/>&gt;&gt; <br/>&gt;&gt; #!/usr/bin/perl -w <br/>&gt;&gt; use strict; <br/>&gt;&gt; use Tk; <br/>&gt;&gt; use Tk::Dialog; <br/>&gt;&gt; use Tk::DialogBox; <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; my $main=MainWindow-&gt;new(); <br/>&gt;&gt; my $X=CheckOk(&#39;Some old question&#39;); <br/>&gt;&gt; print &quot;Response was $X\n&quot;; <br/>&gt;&gt; <br/>&gt;&gt; exit 0; <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; sub CheckOk{ <br/>&gt;&gt; (my $question)=@_; <br/>&gt;&gt; my $box=$main-&gt;DialogBox( <br/>&gt;&gt; -buttons =&gt; [&#39;ok&#39;,&#39;cancel&#39;], <br/>&gt;&gt; -default_button =&gt; &quot;ok&quot;); <br/>&gt;&gt; $box-&gt; add(&quot;Label&quot;, <br/>&gt;&gt; -text =&gt; &quot;$question &quot;)-&gt;pack; <br/>&gt;&gt; $box -&gt; Show(); <br/>&gt;&gt; } <br/>&gt; <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg691.html Tue, 14 Jun 2016 22:12:19 +0000 Re: Simple ok/cancel routine by Jeff Hobbs I believe &lt;Return&gt; may be the default action, where &lt;Space&gt; is what you need to press to get the right action. You&rsquo;ll see OS X behave the same way with its core ok/cancel boxes. <br/> <br/>&gt; On Jun 14, 2016, at 10:29 AM, Philip Brady &lt;phil.brady@hotmail.co.uk&gt; wrote: <br/>&gt; <br/>&gt; <br/>&gt; I&#39;m writing a perl script using Tk and have had some success but I wish to have a very simple subroutine to ask the user a question and get a response &#39;ok&#39; or &#39;cancel&#39;. <br/>&gt; <br/>&gt; My routine follows but it doesn&#39;t quite work as expected. <br/>&gt; It&#39;s fine if I mouse click on &#39;ok&#39; or simply press the return key - it correctly returns &#39;ok&#39;. <br/>&gt; If I clink &#39;cancel&#39; it correctly returns &#39;cancel&#39;. <br/>&gt; <br/>&gt; Unfortunately, if I tab to &#39;cancel&#39; then press return it returns &#39;ok&#39; rather than the desired &#39;cancel&#39;. <br/>&gt; <br/>&gt; I&#39;d appreciate any advice on fixing this. <br/>&gt; regards <br/>&gt; Phil <br/>&gt; <br/>&gt; <br/>&gt; The code is: <br/>&gt; <br/>&gt; #!/usr/bin/perl -w <br/>&gt; use strict; <br/>&gt; use Tk; <br/>&gt; use Tk::Dialog; <br/>&gt; use Tk::DialogBox; <br/>&gt; <br/>&gt; <br/>&gt; my $main=MainWindow-&gt;new(); <br/>&gt; my $X=CheckOk(&#39;Some old question&#39;); <br/>&gt; print &quot;Response was $X\n&quot;; <br/>&gt; <br/>&gt; exit 0; <br/>&gt; <br/>&gt; <br/>&gt; sub CheckOk{ <br/>&gt; (my $question)=@_; <br/>&gt; my $box=$main-&gt;DialogBox( <br/>&gt; -buttons =&gt; [&#39;ok&#39;,&#39;cancel&#39;], <br/>&gt; -default_button =&gt; &quot;ok&quot;); <br/>&gt; $box-&gt; add(&quot;Label&quot;, <br/>&gt; -text =&gt; &quot;$question &quot;)-&gt;pack; <br/>&gt; $box -&gt; Show(); <br/>&gt; } <br/> http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg690.html Tue, 14 Jun 2016 21:00:45 +0000 Simple ok/cancel routine by Philip Brady <br/>I&#39;m writing a perl script using Tk and have had some success but I wish to have a very simple subroutine to ask the user a question and get a response &#39;ok&#39; or &#39;cancel&#39;. <br/> <br/>My routine follows but it doesn&#39;t quite work as expected. <br/>It&#39;s fine if I mouse click on &#39;ok&#39; or simply press the return key - it correctly returns &#39;ok&#39;. <br/>If I clink &#39;cancel&#39; it correctly returns &#39;cancel&#39;. <br/> <br/>Unfortunately, if I tab to &#39;cancel&#39; then press return it returns &#39;ok&#39; rather than the desired &#39;cancel&#39;. <br/> <br/>I&#39;d appreciate any advice on fixing this. <br/>regards <br/>Phil <br/> <br/> <br/>The code is: <br/> <br/>#!/usr/bin/perl -w <br/>use strict; <br/>use Tk; <br/>use Tk::Dialog; <br/>use Tk::DialogBox; <br/> <br/> <br/>my $main=MainWindow-&gt;new(); <br/>my $X=CheckOk(&#39;Some old question&#39;); <br/>print &quot;Response was $X\n&quot;; <br/> <br/>exit 0; <br/> <br/> <br/>sub CheckOk{ <br/> (my $question)=@_; <br/> my $box=$main-&gt;DialogBox( <br/> -buttons =&gt; [&#39;ok&#39;,&#39;cancel&#39;], <br/> -default_button =&gt; &quot;ok&quot;); <br/> $box-&gt; add(&quot;Label&quot;, <br/> -text =&gt; &quot;$question &quot;)-&gt;pack; <br/> $box -&gt; Show(); <br/>} <br/> <br/> <br/> = http://www.nntp.perl.org/group/perl.tcltk/2016/06/msg689.html Tue, 14 Jun 2016 17:29:51 +0000 1st Call For Papers - 23rd Annual Tcl/Tk Conference (Tcl'2016) by akupries <br/>Hello tcltk-perl, fyi ...<br/><br/>23rd Annual Tcl/Tk Conference (Tcl&#39;2016)<br/>http://www.tcl.tk/community/tcl2016/<br/><br/>November 14 - 18, 2016<br/>Crowne Plaza Houston River Oaks<br/>2712 Southwest Freeway, 77098<br/>Houston, Texas, USA<br/><br/>Important Dates:<br/><br/>Abstracts and proposals due September 12, 2016<br/>Notification to authors September 19, 2016<br/>WIP and BOF reservations open August 22, 2016<br/>Author materials due October 24, 2016<br/>Tutorials Start November 14, 2016<br/>Conference starts November 16, 2016<br/><br/>Email Contact: tclconference@googlegroups.com<br/><br/>Submission of Summaries<br/><br/>Tcl/Tk 2016 will be held in Houston, Texas, USA from November 14, 2016 to November 18, 2016.<br/><br/>The program committee is asking for papers and presentation proposals<br/>from anyone using or developing with Tcl/Tk (and extensions). Past<br/>conferences have seen submissions covering a wide variety of topics<br/>including:<br/><br/>* Scientific and engineering applications<br/>* Industrial controls<br/>* Distributed applications and Network Managment<br/>* Object oriented extensions to Tcl/Tk<br/>* New widgets for Tk<br/>* Simulation and application steering with Tcl/Tk<br/>* Tcl/Tk-centric operating environments<br/>* Tcl/Tk on small and embedded devices<br/>* Medical applications and visualization<br/>* Use of different programming paradigms in Tcl/Tk and proposals for new<br/> directions.<br/>* New areas of exploration for the Tcl/Tk language<br/><br/>Submissions should consist of an abstract of about 100 words and a<br/>summary of not more than two pages, and should be sent as plain text<br/>to tclconference@googlegroups.com no later than September 12, 2016. Authors of accepted<br/>abstracts will have until October 24, 2016 to submit their final<br/>paper for the inclusion in the conference proceedings. The proceedings<br/>will be made available on digital media, so extra materials such as<br/>presentation slides, code examples, code for extensions etc. are<br/>encouraged.<br/><br/>Printed proceedings will be produced as an on-demand book at lulu.com<br/><br/>The authors will have 30 minutes to present their paper at<br/>the conference.<br/><br/>The program committee will review and evaluate papers according to the<br/>following criteria:<br/><br/>* Quantity and quality of novel content<br/>* Relevance and interest to the Tcl/Tk community<br/>* Suitability of content for presentation at the conference<br/><br/>Proposals may report on commercial or non-commercial systems, but<br/>those with only blatant marketing content will not be accepted.<br/><br/>Application and experience papers need to strike a balance between<br/>background on the application domain and the relevance of Tcl/Tk to<br/>the application. Application and experience papers should clearly<br/>explain how the application or experience illustrates a novel use of<br/>Tcl/Tk, and what lessons the Tcl/Tk community can derive from the<br/>application or experience to apply to their own development efforts.<br/><br/>Papers accompanied by non-disclosure agreements will be returned to<br/>the author(s) unread. All submissions are held in the highest<br/>confidentiality prior to publication in the Proceedings, both as a<br/>matter of policy and in accord with the U. S. Copyright Act of 1976.<br/><br/>The primary author for each accepted paper will receive registration<br/>to the Technical Sessions portion of the conference at a reduced rate.<br/><br/>Other Forms of Participation<br/><br/>The program committee also welcomes proposals for panel discussions of<br/>up to 90 minutes. Proposals should include a list of confirmed<br/>panelists, a title and format, and a panel description with position<br/>statements from each panelist. Panels should have no more than four<br/>speakers, including the panel moderator, and should allow time for<br/>substantial interaction with attendees. Panels are not presentations<br/>of related research papers.<br/><br/>Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather<br/>sessions (BOFs) are available on a first-come, first-served basis<br/>starting in August 22, 2016. Specific instructions for reserving WIP<br/>and BOF time slots will be provided in the registration information<br/>available in August 22, 2016. Some WIP and BOF time slots will be held open<br/>for on-site reservation. All attendees with an interesting work in<br/>progress should consider reserving a WIP slot.<br/><br/>Registration Information<br/><br/>More information on the conference is available the conference Web<br/>site (http://www.tcl.tk/community/tcl2016/) and will be published on<br/>various Tcl/Tk-related information channels.<br/><br/>To keep in touch with news regarding the conference and Tcl events in<br/>general, subscribe to the tcl-announce list. See:<br/>http://code.activestate.com/lists/tcl-announce to subscribe to the<br/>tcl-announce mailing list.<br/><br/><br/>Conference Committee<br/><br/> * Andreas Kupries Hewlett Packard Enterprise<br/> * Arjen Markus Deltares<br/> * Brian Griffin Mentor Graphics<br/> * Clif Flynt Noumena Corp<br/> * Gerald Lester KnG Consulting LLC<br/> * Joe Mistachkin Mistachkin Systems<br/> * Ronald Fox CAEN Technologies<br/> NSCL @ Michigan State University<br/><br/>Contact Information tclconference@googlegroups.com<br/><br/>Tcl&#39;2016 would like to thank those who are sponsoring the conference:<br/><br/> * Mentor Graphics<br/> * Tcl Community Association<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2016/04/msg688.html Wed, 06 Apr 2016 13:32:01 +0000 [dev] searching for tkkit.dll by Konovalov, Vadim Hi, <br/> <br/>Please notice recent addition to githib.com/gisle/tcl.pm bebe163 <br/>https://github.com/gisle/tcl.pm/commit/bebe163d3773784062b63323d96a923eee272ba5 <br/> <br/>Tcl.pm is not going to seek for tkkit.dll in $path anymore, mostly because it appears to 1) always re-quire Config, which I was very much eager to avoid in general case and only use if nothing more left to do. <br/> <br/>Config.pm is the waste of CPU ticks. <br/> <br/>But most important is 2) that it could happen to be faced sooner than correct DLL, which also required to be non-movable and impossible to PAR and - what most important - 0+) - is of about more restrictive License. <br/> <br/>This module which wants to make tkkit.dll usable from Tcl must include these lines before of &quot;use Tcl;&quot; line <br/> <br/>sub Tcl::seek_tkkit { <br/> unless ($DL_PATH) { <br/> require Config; <br/> for my $inc (@INC) { <br/> my $tkkit = &quot;$inc/auto/Tcl/tkkit.$Config::Config{so}&quot;; <br/> if (-f $tkkit) { <br/> $DL_PATH = $tkkit; <br/> last; <br/> } <br/> } <br/> } <br/>} <br/> <br/>I left a hook in Tcl.pm for this: <br/>seek_tkkit() if defined &amp;seek_tkkit; <br/> <br/>Regards, <br/>Vadim. <br/> http://www.nntp.perl.org/group/perl.tcltk/2016/03/msg687.html Mon, 14 Mar 2016 18:42:13 +0000 RE: Tcl/Tk in par exe by Konovalov, Vadim &gt; From: Kevin Walzer [mailto:kw@codebykevin.com] <br/>&gt; On 9/22/15 10:24 AM, Konovalov, Vadim wrote: <br/>&gt; &gt; Should work, if you place all tcl/tk files as subdir and <br/>&gt; then PAR-pack <br/>&gt; &gt; it into .par archive and &quot;point&quot; tcl_library there <br/>&gt; Well, this suggestion didn&#39;t quite work as presented, but <br/>&gt; it pointed me in the right direction--thanks. <br/> <br/>It could be that you should also call $int-&gt;Init at the right time. <br/> <br/>This is a function that I happen to insert into the Tcl.pm file, could help to understand an idea on what I meant: <br/> <br/>sub new { <br/> my $int = _new(@_); <br/>if ($ENV{PAR_PROGNAME}) { <br/> #$int-&gt;SetVar(&#39;tcl_library&#39;,&quot;$ENV{PAR_TEMP}\\inc\\tcl-togo/lib/tcl8.5&quot;); <br/> Tcl::SetPreInitScript(&quot;set tcl_library {$ENV{PAR_TEMP}/inc/tcl-togo/lib/tcl8.5}; source \&quot;\$::tcl_library/init.tcl\&quot;&quot;); <br/> $int-&gt;Eval( <br/> &#39;package ifneeded Tk 8.5.13 [list load {&#39; . &quot;$ENV{PAR_TEMP}\\&quot;. &#39;tk85.dll} Tk]&#39; <br/> ); <br/> $int-&gt;Init; <br/>} <br/> return $int; <br/>} <br/> <br/>In my setup this works, although I expected to spend less time to make it to work. <br/> <br/> <br/>&gt; I just did a brute force copy of the Tcl installation to <br/>&gt; one of the temp directories that the bundled Tcl.dll was <br/>&gt; looking for init.tcl. Crude, but it works. Now, on to <br/>&gt; fixing the auto_path to load additional packages... <br/> <br/>Maybe this is the right way to go. <br/> <br/>Regards, <br/>Vadim. <br/> http://www.nntp.perl.org/group/perl.tcltk/2015/09/msg686.html Wed, 23 Sep 2015 06:27:46 +0000 Re: Tcl/Tk in par exe by Kevin Walzer On 9/22/15 10:24 AM, Konovalov, Vadim wrote:<br/>&gt; Should work, if you place all tcl/tk files as subdir and then PAR-pack it into .par archive and &quot;point&quot; tcl_library there<br/>Well, this suggestion didn&#39;t quite work as presented, but it pointed me <br/>in the right direction--thanks.<br/><br/>I just did a brute force copy of the Tcl installation to one of the temp <br/>directories that the bundled Tcl.dll was looking for init.tcl. Crude, <br/>but it works. Now, on to fixing the auto_path to load additional packages...<br/><br/>(When I get a bit more along, I&#39;ll post some sample code.)<br/><br/>--Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/09/msg685.html Wed, 23 Sep 2015 02:48:42 +0000 RE: Tcl/Tk in par exe by Konovalov, Vadim You need to &quot;play&quot; with $tcl_library tcl variable, <br/> <br/>$::tcl_library = &#39;....some dir....&#39;; <br/>if (exists $ENV{PAR_TEMP}) { <br/> $::tcl_library = &quot;$ENV{PAR_TEMP}\\inc&quot;; <br/>} <br/> <br/> $int-&gt;SetVar(&#39;tcl_library&#39;,&quot;$::tcl_library1/lib/tcl8.5&quot;); <br/> $int-&gt;Eval($Tcl::init_scripts{&#39;tcl8.5/init.tcl&#39;}); # or you can feed the file with &quot;source&quot; tcl command <br/> <br/>(I&#39;ve &quot;slurped&quot; some tcl init scripts into perl hash and eval it from there, you can just place these where PAR unpacks and &quot;point&quot; it to the tcl/tk) <br/> <br/>Should work, if you place all tcl/tk files as subdir and then PAR-pack it into .par archive and &quot;point&quot; tcl_library there <br/> <br/>-----Original Message----- <br/>From: Kevin Walzer [mailto:kw@codebykevin.com] <br/>Sent: Tuesday, September 22, 2015 2:00 PM <br/>To: tcltk@perl.org <br/>Subject: Re: Tcl/Tk in par exe <br/> <br/>Following up on this: <br/> <br/>I&#39;ve been able to pack the Tcl and Tk dll&#39;s using the &quot;-l&quot; flag with calling pp/par. However, it does not know where to unpack the rest of the Tcl installation in such a way that the app can find them. <br/> <br/>Can&#39;t find a usable init.tcl in the following directories: <br/> C:/Users/kevin/AppData/Local/Temp/par-kevin/lib/tcl8.5 C:/Users/kevin/ <br/>AppData/Local/Temp/par-kevin/lib/tcl8.5 C:/Users/kevin/AppData/Local/Temp/li <br/>b/tcl8.5 C:/Users/kevin/AppData/Local/Temp/par-kevin/library <br/>C:/Users/kevin/AppData/Local/Temp/library <br/>C:/Users/kevin/AppData/Local/Temp/tcl8.6.4/library <br/>C:/Users/kevin/AppData/Local/tcl8.6.4/library <br/> <br/>I&#39;ve seen others on this list report that they use a Tcl/Tk installation rather than ActiveState&#39;s tkkit bits to run Tkx. They&#39;ve also said they can deploy standalone apps with par. Therefore, there should be a way to get the Tcl scripts installed correctly. Can anyone give me some insight on how to do this--where to set up the par installation, how to initialize it in code? Vadim? <br/> <br/>--Kevin <br/> <br/>-- <br/>Kevin Walzer <br/>Code by Kevin/Mobile Code by Kevin <br/>http://www.codebykevin.com <br/>http://www.wtmobilesoftware.com <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2015/09/msg684.html Tue, 22 Sep 2015 14:24:50 +0000 Re: Tcl/Tk in par exe by Kevin Walzer Following up on this:<br/><br/>I&#39;ve been able to pack the Tcl and Tk dll&#39;s using the &quot;-l&quot; flag with <br/>calling pp/par. However, it does not know where to unpack the rest of <br/>the Tcl installation in such a way that the app can find them.<br/><br/>Can&#39;t find a usable init.tcl in the following directories:<br/> C:/Users/kevin/AppData/Local/Temp/par-kevin/lib/tcl8.5 C:/Users/kevin/<br/>AppData/Local/Temp/par-kevin/lib/tcl8.5 C:/Users/kevin/AppData/Local/Temp/li<br/>b/tcl8.5 C:/Users/kevin/AppData/Local/Temp/par-kevin/library <br/>C:/Users/kevin/AppData/Local/Temp/library <br/>C:/Users/kevin/AppData/Local/Temp/tcl8.6.4/library <br/>C:/Users/kevin/AppData/Local/tcl8.6.4/library<br/><br/>I&#39;ve seen others on this list report that they use a Tcl/Tk installation <br/>rather than ActiveState&#39;s tkkit bits to run Tkx. They&#39;ve also said they <br/>can deploy standalone apps with par. Therefore, there should be a way to <br/>get the Tcl scripts installed correctly. Can anyone give me some insight <br/>on how to do this--where to set up the par installation, how to <br/>initialize it in code? Vadim?<br/><br/>--Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/09/msg683.html Tue, 22 Sep 2015 11:00:30 +0000 Tcl/Tk in par exe by Kevin Walzer Hello all,<br/><br/>I&#39;m trying to build a standalone Perl/Tkx application using par and I&#39;m <br/>having trouble getting the bundled app to see Tcl/Tk&#39;s DLL&#39;s.<br/><br/>I&#39;m using a vanilla build of Tcl/Tk to link against, and Strawberry <br/>Perl, so a lot of the advice I&#39;ve seen online (using ActiveState&#39;s <br/>tools, plus their tkkit.dll bits) don&#39;t help me.<br/><br/>Here is how I&#39;m bundling the application:<br/>pp -x -g -a &quot;iconic_stroke.ttf;script/iconic_stroke.ttf&quot; -a <br/>&quot;C:/Tcl;script/Tcl&quot; -a &quot;libs;script/Tcl/applibs&quot; filemorph.pl -o <br/>FileMorph.exe<br/><br/>And here&#39;s how I&#39;m setting the appropriate path for the Tcl bits:<br/><br/>BEGIN {<br/><br/> if ( $Config{osname} eq &quot;MSWin32&quot; ) {<br/><br/> my $frameworkpath = &quot;$Bin/Tcl/bin/tcl86.dll&quot;;<br/> $ENV{&#39;PERL_TCL_DL_PATH&#39;} = $frameworkpath;<br/> }<br/><br/>}<br/><br/>This seems as if it should work. When unpacked, the main script is run <br/>in %tmpdir%/par/cache/inc/script, and the Tcl bits are unpacked in the <br/>same directory, and I&#39;m setting the appropriate path. However, the app <br/>apparently does not see it.<br/><br/>Should I park the Tcl bits somewhere else in the archive? If so, any <br/>suggestions?<br/><br/>--Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/09/msg682.html Sun, 20 Sep 2015 21:16:00 +0000 3rd Call For Papers - 22nd Annual Tcl/Tk Conference (Tcl'2015) by andreask <br/>Hello tcltk-perl, fyi ...<br/><br/>22nd Annual Tcl/Tk Conference (Tcl&#39;2015)<br/>http://www.tcl.tk/community/tcl2015/<br/><br/>October 19 - 23, 2015<br/>Comfort Suites Manassas<br/>7350 Williamson Blvd, 20109<br/>Manassas, Virginia, USA<br/><br/>[[ Attention! One month to the paper deadline ]]<br/><br/>[[ Attention! Registration is open! Please have a look at<br/> http://www.tcl.tk/community/tcl2015/register.html<br/>]]<br/><br/>[[ Known Speakers<br/>-- Keynotes<br/><br/> * Kevin Walzer - Tk on the Mac: Past, Present, Future<br/><br/>-- Tutorials<br/><br/> * Clif Flynt - Advanced Tcl: TclOO Intro<br/> New Tcl/Tk Platforms --- Pi and Android<br/><br/> * Gerald Lester - Introduction to Tcl 1<br/> Introduction to Tcl 2<br/> Introduction to Tk 1<br/> Programming the Web with Tcl: A Survey of Tools, Tips and Tricks<br/><br/> * Sean Woods - Advanced TclOO &amp; Megawidgets in TclOO<br/><br/>]]<br/><br/>Important Dates:<br/><br/>Abstracts and proposals due August 24, 2015<br/>Notification to authors August 31, 2015<br/>WIP and BOF reservations open July 27, 2015<br/>Hotel Room Release August 25, 2015<br/>Author materials due September 28, 2015<br/>Tutorials Start October 19, 2015<br/>Conference starts October 21, 2015<br/><br/>Email Contact: tclconference@googlegroups.com<br/><br/>Submission of Summaries<br/><br/>Tcl/Tk 2015 will be held in Manassas, Virginia, USA from October 19, 2015 to October 23, 2015.<br/><br/>The program committee is asking for papers and presentation proposals<br/>from anyone using or developing with Tcl/Tk (and extensions). Past<br/>conferences have seen submissions covering a wide variety of topics<br/>including:<br/><br/>* Scientific and engineering applications<br/>* Industrial controls<br/>* Distributed applications and Network Managment<br/>* Object oriented extensions to Tcl/Tk<br/>* New widgets for Tk<br/>* Simulation and application steering with Tcl/Tk<br/>* Tcl/Tk-centric operating environments<br/>* Tcl/Tk on small and embedded devices<br/>* Medical applications and visualization<br/>* Use of different programming paradigms in Tcl/Tk and proposals for new<br/> directions.<br/>* New areas of exploration for the Tcl/Tk language<br/><br/>Note:<br/> We are especially interested in papers for OS X this time, to<br/> complement the keynote.<br/><br/>Submissions should consist of an abstract of about 100 words and a<br/>summary of not more than two pages, and should be sent as plain text<br/>to tclconference@googlegroups.com no later than August 24, 2015. Authors of accepted<br/>abstracts will have until September 28, 2015 to submit their final<br/>paper for the inclusion in the conference proceedings. The proceedings<br/>will be made available on digital media, so extra materials such as<br/>presentation slides, code examples, code for extensions etc. are<br/>encouraged.<br/><br/>Printed proceedings will be produced as an on-demand book at lulu.com<br/><br/>The authors will have 30 minutes to present their paper at<br/>the conference.<br/><br/>The program committee will review and evaluate papers according to the<br/>following criteria:<br/><br/>* Quantity and quality of novel content<br/>* Relevance and interest to the Tcl/Tk community<br/>* Suitability of content for presentation at the conference<br/><br/>Proposals may report on commercial or non-commercial systems, but<br/>those with only blatant marketing content will not be accepted.<br/><br/>Application and experience papers need to strike a balance between<br/>background on the application domain and the relevance of Tcl/Tk to<br/>the application. Application and experience papers should clearly<br/>explain how the application or experience illustrates a novel use of<br/>Tcl/Tk, and what lessons the Tcl/Tk community can derive from the<br/>application or experience to apply to their own development efforts.<br/><br/>Papers accompanied by non-disclosure agreements will be returned to<br/>the author(s) unread. All submissions are held in the highest<br/>confidentiality prior to publication in the Proceedings, both as a<br/>matter of policy and in accord with the U. S. Copyright Act of 1976.<br/><br/>The primary author for each accepted paper will receive registration<br/>to the Technical Sessions portion of the conference at a reduced rate.<br/><br/>Other Forms of Participation<br/><br/>The program committee also welcomes proposals for panel discussions of<br/>up to 90 minutes. Proposals should include a list of confirmed<br/>panelists, a title and format, and a panel description with position<br/>statements from each panelist. Panels should have no more than four<br/>speakers, including the panel moderator, and should allow time for<br/>substantial interaction with attendees. Panels are not presentations<br/>of related research papers.<br/><br/>Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather<br/>sessions (BOFs) are available on a first-come, first-served basis<br/>starting in July 27, 2015. Specific instructions for reserving WIP<br/>and BOF time slots will be provided in the registration information<br/>available in July 27, 2015. Some WIP and BOF time slots will be held open<br/>for on-site reservation. All attendees with an interesting work in<br/>progress should consider reserving a WIP slot.<br/><br/>Registration Information<br/><br/>More information on the conference is available the conference Web<br/>site (http://www.tcl.tk/community/tcl2015/) and will be published on<br/>various Tcl/Tk-related information channels.<br/><br/>To keep in touch with news regarding the conference and Tcl events in<br/>general, subscribe to the tcl-announce list. See:<br/>http://code.activestate.com/lists/tcl-announce to subscribe to the<br/>tcl-announce mailing list.<br/><br/><br/>Conference Committee<br/><br/> * Andreas Kupries ActiveState Inc<br/> * Arjen Markus Deltares<br/> * Brian Griffin Mentor Graphics<br/> * Clif Flynt Noumena Corp<br/> * Cynthia Lilagan National Museum of Health &amp; Medicine, Chicago<br/> * Donal Fellows University of Manchester<br/> * Gerald Lester KnG Consulting LLC<br/> * Jeff Hobbs ActiveState Inc<br/> * Joe Mistachkin Mistachkin Systems<br/> * Kevin Kenny GE Global Research Center<br/> * Larry Virden<br/> * Mike Doyle National Museum of Health &amp; Medicine, Chicago<br/> * Ronald Fox CAEN Technologies<br/> NSCL @ Michigan State University<br/> * Steve Landers Digital Smarties<br/> * Steve Redler, IV SR Technology<br/><br/>Contact Information tclconference@googlegroups.com<br/><br/>Tcl&#39;2015 would like to thank those who are sponsoring the conference:<br/><br/> * ActiveState Inc<br/> * Buonacorsi Foundation<br/> * Mentor Graphics<br/> * Noumena Corp<br/> * SR Technology<br/> * Tcl Community Association<br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/07/msg681.html Tue, 28 Jul 2015 18:42:59 +0000 RE: Calling sub from XS via IPC: Tkx functions don't run by Konovalov, Vadim &gt; Here&#39;s a brief example: <br/>&gt; <br/>&gt; sub scriptSetDir { <br/>&gt; my $dname = shift; <br/>&gt; &amp;selectFileSystem(&quot;$dname&quot;); <br/>&gt; return &quot;Set directory as $dname\n&quot;; <br/>&gt; <br/>&gt; } <br/> <br/>... <br/> <br/>&gt; The first two args above are the IPC event codes used by <br/>&gt; the Apple OS to register what events/commands my app will <br/>&gt; handle. The third, which maps the Perl command to the <br/>&gt; &quot;main::&#39;&quot; namespace, fires the Perl-level data processing <br/>&gt; pieces but not the updates to the Tkx UI. <br/> <br/>Do I understand correctly that all is working fine except that your <br/>UI is not updated during that modal window? <br/>Maybe your perl data updates subroutine should invoke $int-&gt;update <br/>in some correct places? (just wild guess, sometimes this is not possible) <br/> <br/>If not, please provide more excerpts from the code to see the details <br/>of the problem. <br/> <br/>For the record, the tk commands to select file/dir do work fine for me: <br/> <br/> my $res = $int-&gt;call( &#39;tk_getOpenFile&#39;, ...) <br/> <br/> my $res = $int-&gt;tk_chooseDirectory( <br/> -initialdir =&gt; $initdir, <br/> -title =&gt; &quot;$oname directory for &#39;--$oname&#39;&quot;, <br/> -mustexist =&gt; ($otype eq &#39;idir&#39; ? 1 : 0), <br/> ); <br/> <br/>Regards, <br/>Vadim. <br/> http://www.nntp.perl.org/group/perl.tcltk/2015/06/msg680.html Mon, 08 Jun 2015 10:36:02 +0000 RE: Wrap Tcl args in Perl subroutne by Konovalov, Vadim Hi Kevin, <br/> <br/>&gt; Related to my other question about Perl, Mac IPC and Tkx, I <br/>&gt; have a more basic question about Tcl/Perl integration. <br/>&gt; <br/>&gt; Tcl has a module for integrating Apple Events and Tcl <br/>&gt; called TclAE. I previously tried to integrate this with my <br/>&gt; apps, and thought it worked, but once I started doing more <br/>&gt; complex things, I got stuck. I suspect the reason is that <br/>&gt; required parameters/args at the Tcl proc level were being <br/>&gt; swallowed up by Perl, causing things to no-op. <br/>&gt; <br/>&gt; <br/>&gt; TclAE maps commands to the Apple IPC mechanism via this <br/>&gt; command <br/>&gt; <br/>&gt; tclAE::installEventHandler{eventclass eventid cmd} <br/>&gt; <br/>&gt; And the Tcl command itself must take this structure: <br/>&gt; <br/>&gt; proc mycmd {event reply} <br/>&gt; <br/>&gt; The two parameters are required. <br/>&gt; <br/>&gt; Installing the event mapping from Perl is easy enough using <br/>&gt; the standard Tkx calling methods: <br/>&gt; <br/>&gt; Tkx::tclAE__installEventHandler (&quot;Perl&quot;, &quot;hihi&quot;, \&amp;hello); <br/>&gt; <br/>&gt; However, Perl subroutines do not provide a mechanism for <br/>&gt; explicit parameters as far as I understand, so I had to do <br/>&gt; this: <br/>&gt; <br/>&gt; sub hello { <br/>&gt; <br/>&gt; } <br/>&gt; <br/>&gt; rather than this: <br/>&gt; <br/>&gt; sub hello {event reply} <br/>&gt; <br/>&gt; I did not know how to get the event-reply args into the <br/>&gt; Perl function and map them to Tcl. As a result, essential <br/>&gt; data was not passed correctly, or saw swallowed up. <br/>&gt; <br/>&gt; Can anyone show me how to do this--to wrap a Tcl command <br/>&gt; with args from Perl so that the args are correctly passed <br/>&gt; to the Tcl interpreter? What is the Perl/Tcl way to access <br/>&gt; &quot;proc cmd {arg1 arg2}&quot; so that arg1 and <br/>&gt; arg2 are not lost? <br/> <br/>I am not sure what exactly causes your problem without seeing <br/>your code, there is some guesses, <br/> <br/>There is some optimization at Tcl side, only requested &quot;event&quot; fields are <br/>generated, so that unneeded event fields are bypassed. <br/> <br/>This makes it necessary to pre-declare %-related events. <br/> <br/>So any event that takes %-field must have been coded like this: <br/> -foo &quot;bar %x %y&quot; <br/> <br/>I do not know whether your problem related to this feature or <br/>not, please show related parts of your code in problem. <br/> <br/>In case my guess is wrong, you still can always specify <br/>-foo {bar arg1 arg2} <br/>After that proc &quot;bar&quot; will receive needed args, <br/> <br/>Best regards, <br/>Vadim. <br/> http://www.nntp.perl.org/group/perl.tcltk/2015/06/msg679.html Mon, 08 Jun 2015 10:07:07 +0000 Wrap Tcl args in Perl subroutne by Kevin Walzer Related to my other question about Perl, Mac IPC and Tkx, I have a more <br/>basic question about Tcl/Perl integration.<br/><br/>Tcl has a module for integrating Apple Events and Tcl called TclAE. I <br/>previously tried to integrate this with my apps, and thought it worked, <br/>but once I started doing more complex things, I got stuck. I suspect the <br/>reason is that required parameters/args at the Tcl proc level were being <br/>swallowed up by Perl, causing things to no-op.<br/><br/><br/>TclAE maps commands to the Apple IPC mechanism via this command<br/><br/>tclAE::installEventHandler{eventclass eventid cmd}<br/><br/>And the Tcl command itself must take this structure:<br/><br/>proc mycmd {event reply}<br/><br/>The two parameters are required.<br/><br/>Installing the event mapping from Perl is easy enough using the standard <br/>Tkx calling methods:<br/><br/>Tkx::tclAE__installEventHandler (&quot;Perl&quot;, &quot;hihi&quot;, \&amp;hello);<br/><br/>However, Perl subroutines do not provide a mechanism for explicit <br/>parameters as far as I understand, so I had to do this:<br/><br/>sub hello {<br/><br/>}<br/><br/>rather than this:<br/><br/>sub hello {event reply}<br/><br/>I did not know how to get the event-reply args into the Perl function <br/>and map them to Tcl. As a result, essential data was not passed <br/>correctly, or saw swallowed up.<br/><br/>Can anyone show me how to do this--to wrap a Tcl command with args from <br/>Perl so that the args are correctly passed to the Tcl interpreter? What <br/>is the Perl/Tcl way to access &quot;proc cmd {arg1 arg2}&quot; so that arg1 and <br/>arg2 are not lost?<br/><br/>--Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/06/msg678.html Wed, 03 Jun 2015 14:17:58 +0000 Calling sub from XS via IPC: Tkx functions don't run by Kevin Walzer (Sorry if this is a double-post, I sent first to the newsgroup rather <br/>than the mailing list).<br/><br/>As I&#39;ve mentioned before on the list, I&#39;m working on a Perl extension <br/>that allows integration between a Perl app and other Mac apps via the <br/>Apple Events IPC mechanism. There is an older Perl package (Mac::Carbon) <br/>that provides such functionality among its other methods, but much of it <br/>is obsolete and/or will no longer build, and the author has not updated <br/>the package for years.<br/><br/>I have made excellent progress and have gotten the C side pretty much <br/>worked out: I can send basic commands via the Apple Event/AppleScript <br/>mechanism to my Perl/Tkx app, have the app run a command, and return <br/>output via the Apple Event pipeline. I am running into an unexpected <br/>difficulty, however. The commands that I am exposing involve a <br/>combination of data processing and also updating the UI of my <br/>application. The data side works, but the UI (which is controlled by the <br/>Tkx event loop) does not respond.<br/><br/>Here&#39;s a brief example:<br/><br/>sub scriptSetDir {<br/> my $dname = shift;<br/> &amp;selectFileSystem(&quot;$dname&quot;);<br/> return &quot;Set directory as $dname\n&quot;;<br/><br/>}<br/><br/>This command is supposed to grab a directory name as the command <br/>parameter, sets a variable to that value, run the internal <br/>&quot;selectFileSystem&quot; command that updates the app UI with the contents of <br/>the directory, and the returns the command result to the external IPC <br/>mechanism. The first and the last things happen, but the <br/>&amp;selectFileSystem call does not fire. It&#39;s not clear to me why this is <br/>the case.<br/><br/>Getting the form of the command name passed to the Apple Events <br/>mechanism has proven a bit tricky; Perl would complain about &quot;undefined <br/>subroutine&quot; if I just passed the bare name of the command to the IPC <br/>mechanism. Interestingly, it would complain that the name <br/>&quot;Tkx::i::scriptSetDir&quot; was the command. I&#39;m not sure where the Tkx::i <br/>namespace came from in this regard. Eventually, this form of mapping the <br/>command worked:<br/><br/> Mac::AEM::installeventhandler( &quot;CoKv&quot;, &quot;fMdr&quot;, &quot;main::scriptSetDir&quot; );<br/><br/>The first two args above are the IPC event codes used by the Apple OS to <br/>register what events/commands my app will handle. The third, which maps <br/>the Perl command to the &quot;main::&#39;&quot; namespace, fires the Perl-level data <br/>processing pieces but not the updates to the Tkx UI.<br/><br/>I suspect there is something going on with the Tkx event loop that <br/>simply does not receive the message to fire the command; I know that <br/>from trying to integrate Tkx with other Perl IPC systems that only <br/>running a Tcl-based socket plays nicely with Tkx. The Apple Event <br/>mechanism, however, is lower-level and plays nicely with Tk in other <br/>contexts (I&#39;ve gotten it to work with Tcl/Tk and Python/Tkinter). <br/>Because there are so many layers here, it&#39;s hard to figure out where to <br/>debug it. Has anyone else used some kind of IPC mechanism with Perl/Tkx <br/>successfully, perhaps with COM on Windows or dbus on Linux (the rough <br/>analogs to Apple Events on other platforms)?<br/><br/>Advice is appreciated.<br/><br/>--Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/06/msg677.html Wed, 03 Jun 2015 14:15:13 +0000 Re: CreateCommand question by Kevin Walzer On 5/6/15 1:40 PM, Konovalov, Vadim wrote:<br/>&gt;&gt; I am working on a Perl/Tkx app and trying to use the Tcl<br/>&gt;&gt; module&#39;s CreateCommand call to feed a Perl subroutine<br/>&gt;&gt; directly to the Tcl interpreter. There is no documentation<br/>&gt;&gt; on how to do this directly from Tkx so I&#39;ve done a bit of<br/>&gt;&gt; code diving into the module&#39;s internals.<br/>&gt;<br/>&gt; use Tkx;<br/>&gt; my $mw = Tkx::widget-&gt;new(&quot;.&quot;);<br/>&gt; $mw-&gt;new_button(<br/>&gt; -text =&gt; &quot;Hello, world&quot;,<br/>&gt; -command =&gt; sub { $mw-&gt;g_destroy; },<br/>&gt; )-&gt;g_pack;<br/>&gt; Tkx::i::interp()-&gt;CreateCommand(&#39;scriptSetDir&#39;, \&amp;scriptSetDir);<br/>&gt; sub scriptSetDir {<br/>&gt; print STDERR &#39;[&#39;,(join &#39;,&#39;, @_),&#39;]&#39;;<br/>&gt; return;<br/>&gt; my $dname = shift;<br/>&gt; &amp;selectFileSystem($dname);<br/>&gt; }<br/>&gt; Tkx::eval(&quot;scriptSetDir&quot;, &quot;/Users/kevin&quot;);<br/>&gt; Tkx::MainLoop();<br/>&gt;<br/><br/>This command construction worked best for me:<br/><br/> Tkx::i::interp()<br/> -&gt;CreateCommand( &quot;scriptSetDir&quot;, \&amp;scriptSetDir, undef, undef, &#39;1&#39; );<br/><br/>Thanks,<br/>Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/05/msg676.html Fri, 08 May 2015 11:13:52 +0000 RE: CreateCommand question by Konovalov, Vadim &gt; I am working on a Perl/Tkx app and trying to use the Tcl <br/>&gt; module&#39;s CreateCommand call to feed a Perl subroutine <br/>&gt; directly to the Tcl interpreter. There is no documentation <br/>&gt; on how to do this directly from Tkx so I&#39;ve done a bit of <br/>&gt; code diving into the module&#39;s internals. <br/> <br/>Looking inside Tkx.pm: <br/> <br/>..... <br/>package Tkx::i; <br/> <br/>use Tcl; <br/> <br/>my $interp; <br/>..... <br/>sub interp { <br/> return $interp; <br/>} <br/> <br/>... <br/> <br/>This give me an idea that you can always get tcl <br/>Interpreter by calling Tkx::i::interp(), <br/> <br/>After figuring out that, I conclude on this: <br/> <br/>use Tkx; <br/>my $mw = Tkx::widget-&gt;new(&quot;.&quot;); <br/>$mw-&gt;new_button( <br/> -text =&gt; &quot;Hello, world&quot;, <br/> -command =&gt; sub { $mw-&gt;g_destroy; }, <br/>)-&gt;g_pack; <br/>Tkx::i::interp()-&gt;CreateCommand(&#39;scriptSetDir&#39;, \&amp;scriptSetDir); <br/>sub scriptSetDir { <br/> print STDERR &#39;[&#39;,(join &#39;,&#39;, @_),&#39;]&#39;; <br/> return; <br/> my $dname = shift; <br/> &amp;selectFileSystem($dname); <br/>} <br/>Tkx::eval(&quot;scriptSetDir&quot;, &quot;/Users/kevin&quot;); <br/>Tkx::MainLoop(); <br/> <br/> <br/>.... but even a bit better is this: <br/> <br/>use Tkx; <br/>my $mw = Tkx::widget-&gt;new(&quot;.&quot;); <br/>$mw-&gt;new_button( <br/> -text =&gt; &quot;Hello, world&quot;, <br/> -command =&gt; sub { $mw-&gt;g_destroy; }, <br/>)-&gt;g_pack; <br/>Tkx::i::interp()-&gt;CreateCommand(&#39;scriptSetDir-hehe&#39;, sub { <br/> print STDERR &#39;[&#39;,(join &#39;,&#39;, @_),&#39;]&#39;; <br/> return; <br/>}); <br/>Tkx::i::interp()-&gt;call(&quot;scriptSetDir-hehe&quot;, &quot;/Users/kevin&quot;); <br/>Tkx::MainLoop(); <br/> <br/>&gt; <br/>&gt; This is what I&#39;ve come up with, but it&#39;s not working well: <br/>&gt; <br/>&gt; #get Tkx&#39;s interpreter instance rather than creating a new <br/>&gt; interpreter; this is undocumented but should work my <br/>&gt; $interp = Tkx::i::interp; <br/>&gt; <br/>&gt; #next, pass a Perl subroutine to the Tcl interpreter <br/>&gt; <br/>&gt; $interp-&gt;CreateCommand(&quot;&quot;, \&amp;scriptSetDir, &quot;&quot;, &quot;&quot;, &quot;&quot;); sub <br/>&gt; scriptSetDir { <br/>&gt; <br/>&gt; my $dname = shift; <br/>&gt; &amp;selectFileSystem($dname); <br/>&gt; <br/>&gt; } <br/>&gt; <br/>&gt; This call produces no output: <br/>&gt; <br/>&gt; Tkx::eval(&quot;scriptSetDir&quot;, &quot;/Users/kevin&quot;); <br/> <br/>IMO the more pure-Tcl usage from perl/Tkx the better,... <br/> <br/>Best regards, <br/>Vadim. <br/> http://www.nntp.perl.org/group/perl.tcltk/2015/05/msg675.html Wed, 06 May 2015 17:41:42 +0000 CreateCommand question by Kevin Walzer Hello,<br/><br/>I am working on a Perl/Tkx app and trying to use the Tcl module&#39;s <br/>CreateCommand call to feed a Perl subroutine directly to the Tcl <br/>interpreter. There is no documentation on how to do this directly from <br/>Tkx so I&#39;ve done a bit of code diving into the module&#39;s internals.<br/><br/>This is what I&#39;ve come up with, but it&#39;s not working well:<br/><br/>#get Tkx&#39;s interpreter instance rather than creating a new interpreter; <br/>this is undocumented but should work<br/>my $interp = Tkx::i::interp;<br/><br/>#next, pass a Perl subroutine to the Tcl interpreter<br/><br/>$interp-&gt;CreateCommand(&quot;&quot;, \&amp;scriptSetDir, &quot;&quot;, &quot;&quot;, &quot;&quot;);<br/>sub scriptSetDir {<br/><br/> my $dname = shift;<br/> &amp;selectFileSystem($dname);<br/><br/>}<br/><br/>This call produces no output:<br/><br/>Tkx::eval(&quot;scriptSetDir&quot;, &quot;/Users/kevin&quot;);<br/><br/>Any suggestions as to what I am doing wrong?<br/><br/>Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2015/05/msg674.html Wed, 06 May 2015 15:00:16 +0000 21th Tcl Conference - Registration & Hotel Reminder by Andreas Kupries 21&#39;th Annual Tcl/Tk Conference (Tcl&#39;2014)<br/>http://www.tcl.tk/community/tcl2014/<br/><br/>This is a reminder that Registration for the Conference is open and<br/>can be done at<br/><br/> http://www.tcl.tk/community/tcl2014/reg.html<br/><br/>Note that the holding period for hotel rooms has passed. To register<br/>for a room, call 1-503-796-3851, speak to Mary Kirchner and mention<br/>the Tcl Conference to receive the reduced rate.<br/><br/>See you in Portland,<br/><br/>Andreas Kupries<br/>Tcl 2014 Program Chair<br/>ActiveState Software Inc.<br/>Vancouver, BC, Canada<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2014/10/msg673.html Wed, 15 Oct 2014 11:56:54 +0000 Re: Dialog widgets and global mode by Kevin Walzer On 9/15/14, 5:16 PM, Gary Sachs wrote:<br/>&gt; Using Perl and Tkx, trying to create some dialog boxes that use &quot;global&quot;<br/>&gt; mode, but that does now seem to work. I can still access other<br/>&gt; applications and windows.I have tried using widget::dialog and Dialog<br/>&gt; from the BWidget group and tk_widget they all behave the same, &quot;global&quot;<br/>&gt; just seems to be ignored and defaults to a &quot;local&quot; behavior.<br/><br/>What do you mean by &quot;global&quot; mode? Meaning, a global grab, so that they <br/>prevent interaction with any other app?<br/><br/>This behavior is really only supported under X11--Mac and (as far as I <br/>know) Windows don&#39;t really support this kind of extreme modal dialog <br/>(rightly so, I think).<br/><br/>--Kevin<br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/> http://www.nntp.perl.org/group/perl.tcltk/2014/09/msg672.html Tue, 16 Sep 2014 13:00:15 +0000 ScrollableFrames by Gary Sachs Good Day,<br/><br/>does the scrollableframes widget support the use of the &quot;place&quot; geometry<br/>manager? It works with the grid geometry manager, but wanted to use &quot;place&quot;.<br/><br/>AS PERL V5.16-3<br/>TCL 8.5.13<br/>Windows 7 x64<br/><br/>thank you,<br/>gary http://www.nntp.perl.org/group/perl.tcltk/2014/09/msg671.html Tue, 16 Sep 2014 12:15:42 +0000 Dialog widgets and global mode by Gary Sachs I thought this worked, but maybe I am doing something wrong.<br/>AS PERL V5.16-3<br/>tcl V8.5.13<br/>Windows 7 x64<br/><br/>Using Perl and Tkx, trying to create some dialog boxes that use &quot;global&quot;<br/>mode, but that does now seem to work. I can still access other applications<br/>and windows.I have tried using widget::dialog and Dialog from the BWidget<br/>group and tk_widget they all behave the same, &quot;global&quot; just seems to be<br/>ignored and defaults to a &quot;local&quot; behavior.<br/><br/>Anyone have a working example of a simple dialog using &quot;global&quot; modal?<br/><br/>thanks,<br/>gary http://www.nntp.perl.org/group/perl.tcltk/2014/09/msg670.html Tue, 16 Sep 2014 12:15:36 +0000 RE: Exposing Tcl commands via Perl Tkx for Apple Event IPC by Konovalov, Vadim &gt; From: Kevin Walzer [mailto:kw@codebykevin.com] <br/> <br/>&gt; The solution was so simple and elegant it astounded me: <br/>&gt; <br/>&gt; Tkx::tclAE__installEventHandler (&quot;Perl&quot;, &quot;hihi&quot;, \&amp;hello); <br/>&gt; <br/>&gt; In other words, pass the reference to the subroutine, just like a command <br/>&gt; callback, and the Tkx bridge takes care of mapping it internally to a Tcl <br/>&gt; command and then returning the correct output first to the app, then to the <br/>&gt; calling AppleScript. <br/>&gt; <br/>&gt; Amazing. I&#39;ve been beating my head against a wall for a week trying to get <br/>&gt; this to work at the C level, without results. This opens up all kinds of things <br/>&gt; for my projects--thank you so much for the terrific work! <br/> <br/>Hi Kevin, <br/>Sorry for not replying earlier, when you haven&#39;t figured out the solution yet. <br/> <br/>I want to add, that - while you&#39;ve found correct solution, there is some more TIMTOWTDI that I regularly use. <br/> <br/>For a long time already I more heavily use just Tcl module, with only minimal addition of higher-level modules (like Tkx or Tcl::Tk in my case) <br/> <br/>You can just do <br/>$int-&gt;Eval(&#39;.....&#39;); # include any multiline code here to create widgets or whatever <br/> <br/>And then <br/>$int-&gt;call(&#39;cmd&#39;, &#39;arg1&#39;, &#39;etc&#39;); # for tcl/tk commands <br/>$int-&gt;icall(&#39;.widget.some.thing&#39;, &#39;widgetmeth&#39;, &#39;etc&#39;); # for tcl/tk commands that do not involve perl references <br/>$int-&gt;icall(&#39;.widget.some.thing&#39;, &#39;-command&#39;, &#39;puts hello&#39;}); # ... do not involve perl references <br/>$int-&gt;call(&#39;.widget.some.thing&#39;, &#39;-command&#39;, sub{print &#39;hello&#39;}); # here sub {} - binded to tcl/tk counterpart <br/> <br/>&#39;icall&#39; faster than &#39;call&#39; and it does not do any perl reference to tcl binding. <br/> <br/>While I am using Tcl::Tk instead of Tkx - both are on top of same Tcl module, just different syntax - the same apply. <br/> <br/>Regards, <br/>Vadim. <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2014/06/msg669.html Wed, 25 Jun 2014 10:36:18 +0000 Re: Exposing Tcl commands via Perl Tkx for Apple Event IPC by Kevin Walzer On 6/22/14, 12:13 PM, Kevin Walzer wrote:<br/>&gt; tclAE works by allowing you to register specific Apple Events with the<br/>&gt; system and to register an internal Tcl command that implements the Apple<br/>&gt; Event functionality. (Externally the command is mapped to an AppleScript<br/>&gt; command that is registered elsewhere.) Doing this via Tkx, I have<br/>&gt; started with this command:<br/>&gt;<br/>&gt; Tkx::tclAE__installEventHandler (&quot;Perl&quot;, &quot;hihi&quot;, &quot;perl::hello&quot;);<br/>&gt;<br/>&gt; &quot;Perl&quot; and &quot;hihi&quot; are the Apple Event fields (they are arbitrary<br/>&gt; four-char fields) and &quot;perl::hello&quot; is the internal subroutine that<br/>&gt; responds to the command. That should work, but when I actually run an<br/>&gt; AppleScript command targeting my test app, I get this error:<br/>&gt;<br/>&gt; perlapp got an error: invalid command name &quot;perl::hello&quot;<br/>&gt;<br/>&gt; That error string means that it&#39;s a non-existent Tcl command.<br/>&gt;<br/>&gt; Here is where I am not sure if I am doing things correctly. I am<br/>&gt; exposing the Perl command to the Tcl interpreter by defining it thus as<br/>&gt; a Perl subroutine:<br/>&gt;<br/>&gt; sub tcl::hello (theAppleEvent theReturnAE)<br/>&gt;<br/>&gt; and then exporting it thus:<br/>&gt;<br/>&gt; my $tcl = Tcl-&gt;new;<br/>&gt;<br/>&gt; $tcl-&gt;export_to_tcl(subs_from=&gt;&#39;tcl&#39;, vars_from=&gt;&#39;tcl&#39;);<br/>&gt;<br/>&gt; This seems to provide the cleanest and simplest mapping between Perl<br/>&gt; subroutines and Tcl commands. I am also aware that I can define the<br/>&gt; command as this:<br/>&gt;<br/>&gt; $tcl-&gt;CreateCommand(hello, \&amp;hello):<br/>&gt;<br/>&gt; Is one method better than the other?<br/>&gt;<br/>&gt; In any event, tclAE is not picking up on the Tcl command I&#39;m passing to<br/>&gt; the Tcl interpreter, and I believe it should. Can anyone suggest how I<br/>&gt; can get this command exposed cleanly to the Tcl interpreter if I am not<br/>&gt; doing it correctly?<br/><br/>After doing more investigation, I believe the command was not being <br/>picked up because the call to Tcl-&gt;new produced a new Tcl interpreter. <br/>What I was looking to do was to have the command picked up by the main <br/>Tcl interpreter, running the GUI code.<br/><br/>The solution was so simple and elegant it astounded me:<br/><br/>Tkx::tclAE__installEventHandler (&quot;Perl&quot;, &quot;hihi&quot;, \&amp;hello);<br/><br/>In other words, pass the reference to the subroutine, just like a <br/>command callback, and the Tkx bridge takes care of mapping it internally <br/>to a Tcl command and then returning the correct output first to the app, <br/>then to the calling AppleScript.<br/><br/>Amazing. I&#39;ve been beating my head against a wall for a week trying to <br/>get this to work at the C level, without results. This opens up all <br/>kinds of things for my projects--thank you so much for the terrific work!<br/><br/>--Kevin<br/><br/><br/><br/><br/><br/><br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/> http://www.nntp.perl.org/group/perl.tcltk/2014/06/msg668.html Mon, 23 Jun 2014 14:57:27 +0000 Exposing Tcl commands via Perl Tkx for Apple Event IPC by Kevin Walzer I&#39;ve been trying, without success, to write an Apple Event library for <br/>Perl that will allow my Perl Tkx apps to respond to and send Apple <br/>Events. (Apple Events are a form of IPC on the Mac that allows native <br/>apps to communicate with each other, exchange data, and even drive other <br/>apps--somewhat analogous to COM or DDE on Windows.) Perl&#39;s C API is very <br/>gnarly and so is the Apple Events API from C, and so I&#39;ve made little <br/>progress there. There is a long-established support for Apple Events in <br/>the Mac::Carbon module at CPAN, but this module does not support 64-bit <br/>(Apple has deprecated many of the API&#39;s the module wraps) and its author <br/>is disinclined to update it, instead advising users to simply run Perl <br/>as a 32-bit app--not a viable option for me.<br/><br/>As a result, I have turned to a native Tcl library that integrates with <br/>the Apple Event API, tclAE (http://tclae.sourceforge.net). I&#39;ve used <br/>this library directly from Tcl with no problem, and would like to use <br/>Tkx&#39;s integration to use it in my Perl Tk apps as well. However, thus <br/>far I have not had success.<br/><br/>tclAE works by allowing you to register specific Apple Events with the <br/>system and to register an internal Tcl command that implements the Apple <br/>Event functionality. (Externally the command is mapped to an AppleScript <br/>command that is registered elsewhere.) Doing this via Tkx, I have <br/>started with this command:<br/><br/>Tkx::tclAE__installEventHandler (&quot;Perl&quot;, &quot;hihi&quot;, &quot;perl::hello&quot;);<br/><br/>&quot;Perl&quot; and &quot;hihi&quot; are the Apple Event fields (they are arbitrary <br/>four-char fields) and &quot;perl::hello&quot; is the internal subroutine that <br/>responds to the command. That should work, but when I actually run an <br/>AppleScript command targeting my test app, I get this error:<br/><br/>perlapp got an error: invalid command name &quot;perl::hello&quot;<br/><br/>That error string means that it&#39;s a non-existent Tcl command.<br/><br/>Here is where I am not sure if I am doing things correctly. I am <br/>exposing the Perl command to the Tcl interpreter by defining it thus as <br/>a Perl subroutine:<br/><br/>sub tcl::hello (theAppleEvent theReturnAE)<br/><br/>and then exporting it thus:<br/><br/>my $tcl = Tcl-&gt;new;<br/><br/>$tcl-&gt;export_to_tcl(subs_from=&gt;&#39;tcl&#39;, vars_from=&gt;&#39;tcl&#39;);<br/><br/>This seems to provide the cleanest and simplest mapping between Perl <br/>subroutines and Tcl commands. I am also aware that I can define the <br/>command as this:<br/><br/>$tcl-&gt;CreateCommand(hello, \&amp;hello):<br/><br/>Is one method better than the other?<br/><br/>In any event, tclAE is not picking up on the Tcl command I&#39;m passing to <br/>the Tcl interpreter, and I believe it should. Can anyone suggest how I <br/>can get this command exposed cleanly to the Tcl interpreter if I am not <br/>doing it correctly?<br/><br/>--Kevin<br/>-- <br/>Kevin Walzer<br/>Code by Kevin/Mobile Code by Kevin<br/>http://www.codebykevin.com<br/>http://www.wtmobilesoftware.com<br/> http://www.nntp.perl.org/group/perl.tcltk/2014/06/msg667.html Sun, 22 Jun 2014 16:14:02 +0000 Re: HTML5 by Jeff Hobbs Hi Gary,<br/><br/>I believe the list should still be active (I&#39;ll see with this mail).<br/><br/>There is an html5 widget - tkhtml. It will work with Tkx, but needs<br/>to be added in like any other external module (it is a C-based<br/>widget). See more at http://tkhtml.tcl.tk/.<br/><br/>Regards,<br/><br/>Jeff<br/><br/>On Tue, May 13, 2014 at 10:21 AM, gary sachs<br/>&lt;conversecorollary@yahoo.com&gt; wrote:<br/>&gt; Hi Jeff,<br/>&gt;<br/>&gt; A couple of questions...<br/>&gt;<br/>&gt; 1. I the the tcltk@perl.org mailing list still functional? I tried earlier<br/>&gt; it was rejected/returned.<br/>&gt;<br/>&gt; 2. Is there a HTML5 widget I can access via Tkx with AS-PERL v5.16? If so,<br/>&gt; is there a pointer to its documentation?<br/>&gt;<br/>&gt; Thank you,<br/>&gt; gary<br/> http://www.nntp.perl.org/group/perl.tcltk/2014/05/msg666.html Tue, 13 May 2014 17:36:10 +0000 1st Call For Papers, 21th Annual Tcl/Tk Conference 2014 by Andreas Kupries 21&#39;th Annual Tcl/Tk Conference (Tcl&#39;2014)<br/>http://www.tcl.tk/community/tcl2014/<br/><br/>November 10 - 14, 2014<br/>Embassy Suites Downtown<br/>Portland, Oregon, USA<br/><br/>Important Dates:<br/><br/>Abstracts and proposals due Sep 8, 2014<br/>Notification to authors Sep 22, 2014<br/>Author materials due Oct 20, 2014<br/>Tutorials start Nov 10, 2014<br/>Conference starts Nov 12, 2014<br/><br/>[[ <br/> Registration is open.<br/>]]<br/><br/>Email Contact: tclconference@googlegroups.com<br/><br/>Submission of Summaries<br/><br/>Tcl/Tk 2014 will be held in Portland, Oregon, USA from November<br/>10 - 14, 2014. The program committee is asking for papers and<br/>presentation proposals from anyone using or developing with Tcl/Tk<br/>(and extensions). Past conferences have seen submissions covering a<br/>wide variety of topics including:<br/><br/>* Scientific and engineering applications<br/>* Industrial controls<br/>* Distributed applications and Network Managment<br/>* Object oriented extensions to Tcl/Tk<br/>* New widgets for Tk<br/>* Simulation and application steering with Tcl/Tk<br/>* Tcl/Tk-centric operating environments<br/>* Tcl/Tk on small and embedded devices<br/>* Medical applications and visualization<br/>* Use of different programming paradigms in Tcl/Tk and proposals for new<br/> directions.<br/>* New areas of exploration for the Tcl/Tk language<br/><br/>Submissions should consist of an abstract of about 100 words and a<br/>summary of not more than two pages, and should be sent as plain text<br/>to &lt;tclconference AT googlegroups DOT com&gt; no later than August 5,<br/>2014. Authors of accepted abstracts will have until September 2, 2014<br/>to submit their final paper for the inclusion in the conference<br/>proceedings. The proceedings will be made available on digital media,<br/>so extra materials such as presentation slides, code examples, code<br/>for extensions etc. are encouraged.<br/><br/>Printed proceedings will be produced as an on-demand book at lulu.com<br/><br/>The authors will have 25 minutes to present their paper at the<br/>conference.<br/><br/>The program committee will review and evaluate papers according to the<br/>following criteria:<br/><br/>* Quantity and quality of novel content<br/>* Relevance and interest to the Tcl/Tk community<br/>* Suitability of content for presentation at the conference<br/><br/>Proposals may report on commercial or non-commercial systems, but<br/>those with only blatant marketing content will not be accepted.<br/><br/>Application and experience papers need to strike a balance between<br/>background on the application domain and the relevance of Tcl/Tk to<br/>the application. Application and experience papers should clearly<br/>explain how the application or experience illustrates a novel use of<br/>Tcl/Tk, and what lessons the Tcl/Tk community can derive from the<br/>application or experience to apply to their own development efforts.<br/><br/>Papers accompanied by non-disclosure agreements will be returned to<br/>the author(s) unread. All submissions are held in the highest<br/>confidentiality prior to publication in the Proceedings, both as a<br/>matter of policy and in accord with the U. S. Copyright Act of 1976.<br/><br/>The primary author for each accepted paper will receive registration<br/>to the Technical Sessions portion of the conference at a reduced rate.<br/><br/>Other Forms of Participation<br/><br/>The program committee also welcomes proposals for panel discussions of<br/>up to 90 minutes. Proposals should include a list of confirmed<br/>panelists, a title and format, and a panel description with position<br/>statements from each panelist. Panels should have no more than four<br/>speakers, including the panel moderator, and should allow time for<br/>substantial interaction with attendees. Panels are not presentations<br/>of related research papers.<br/><br/>Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather<br/>sessions (BOFs) are available on a first-come, first-served basis.<br/>WIP slots can be reserved like any paper proposal. BOF slots will be<br/>managed on-site. All attendees with an interesting work in progress<br/>should consider reserving a WIP slot.<br/><br/>Registration Information<br/><br/>More information on the conference is available the conference Web<br/>site (http://www.tcl.tk/community/tcl2014/) and will be published on<br/>various Tcl/Tk-related information channels.<br/><br/> Registration is open.<br/><br/>To keep in touch with news regarding the conference and Tcl events in<br/>general, subscribe to the tcl-announce list. See:<br/>http://code.activestate.com/lists/tcl-announce to subscribe to the<br/>tcl-announce mailing list.<br/><br/><br/>Conference Committee<br/><br/>Clif Flynt Noumena Corp General Chair, Website Admin<br/>Andreas Kupries ActiveState Software Inc. Program Chair<br/>Brian Griffin Mentor Graphics Site/Facilities Chair<br/>Arjen Markus Deltares<br/>Cyndy Lilagan Nat. Museum of Health &amp; Medicine, Chicago<br/>Donal Fellows University of Manchester<br/>Gerald Lester KnG Consulting, LLC<br/>Jeffrey Hobbs ActiveState Software Inc.<br/>Kevin Kenny GE Global Research Center<br/>Larry Virden<br/>Mike Doyle National Museum of Health &amp; Medicine, Chicago<br/>Ron Fox NSCL/FRIB Michigan State University<br/>Steve Landers Digital Smarties<br/><br/>Contact Information tclconference@googlegroups.com<br/><br/><br/>Tcl&#39;2014 would like to thank those who are sponsoring the conference:<br/><br/>ActiveState Software Inc.<br/>Buonacorsi Foundation<br/>Mentor Graphics<br/>Noumena Corp.<br/>SR Technology<br/>Tcl Community Association<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2014/05/msg665.html Fri, 02 May 2014 07:21:39 +0000 Re: Cant install Tcl::Tk by Jeff Hobbs Hi Richard, <br/> <br/>You might see if plotchart, a pure Tcl package, might work for you: <br/> <br/>http://wiki.tcl.tk/18167 <br/> <br/>Data could be passed from Perl as Tcl lists and Perl arrays auto-convert. Barcharts are generally simple enough that the core Tk canvas handles them well, it just needs a simple library (e.g. plotchart) to do the drawing. <br/> <br/>Jeff <br/> <br/>On 2014-01-16, at 12:00 AM, Richard Hainsworth &lt;rnhainsworth@gmail.com&gt; wrote: <br/> <br/>&gt; Thanks Vadim for you quick reply. <br/>&gt; <br/>&gt; I want to plot data I have generated. I can extract the data using perl since I know perl. I dont want to learn Tcl just to extract data so I can then plot it. <br/>&gt; <br/>&gt; On 01/16/2014 01:41 PM, Konovalov, Vadim wrote: <br/>&gt;&gt; Thank you for your report, Indeed, there are items to fix, I&#39;ll do my best to fix and release by Jan, 19. Despite of this, you already have setup ready for the usage. <br/>&gt;&gt;&gt; I&#39;ve tried repeatedly to install TCL::Tk. I want to use BLT. <br/>&gt;&gt; BTW Tcl::Tk is pure-perl, but - indeed - its better to have clean install rather than &#39;force&#39; option. <br/>&gt;&gt; Yet, for using BLT Tcl::Tk isn&#39;t necessary, you can use BLT with just Tcl.pm module or Tkx, <br/>&gt;&gt; <br/>&gt;&gt; Like this: <br/>&gt;&gt; <br/>&gt;&gt; $interp-&gt;Eval(&lt;&lt;&#39;EOS&#39;); <br/>&gt;&gt; # tcl/tk code here <br/>&gt;&gt; package require Blt <br/>&gt;&gt; pack [text .t] <br/>&gt;&gt; # etc etc etc <br/>&gt;&gt; EOS <br/>&gt; I could figure most of this out. But what I dont know is how to populate data structures in Perl that can be used in Tcl. <br/>&gt; <br/>&gt; What I need BLT is to created stacked barcharts. It seems that the only software to do this is GD, BLT and WXfreechart. <br/>&gt; <br/>&gt; My solution so far is to generate GD images and then use Tk to display them. <br/>&gt;&gt; However if you&#39;re planning to use BLT with perl/Tk syntax - then Tcl::Tk is indeed needed. <br/>&gt;&gt; <br/>&gt;&gt; Cool, actually the Tcl CPAN module is the crucial point as a perl-to-tcl/tk bridge. <br/>&gt;&gt;&gt; CPAN.pm: Building V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/>&gt;&gt; .... <br/>&gt;&gt; <br/>&gt;&gt;&gt; t/text.t ........ can&#39;t find package widget::scrolledwindow at <br/>&gt;&gt;&gt; /home/richard/.local/share/.cpan/build/Tcl-Tk-1.04- <br/>&gt;&gt;&gt; 2tDOWV/blib/lib/Tcl/Tk.pm <br/>&gt;&gt;&gt; line 794. <br/>&gt;&gt; This message means that your tcl/tk installation should also have snit2 or snit, <br/>&gt;&gt; because $widget-&gt;Scrolled(...) is implemented used &#39;snit&#39;. <br/>&gt;&gt; <br/>&gt;&gt; I will try to figure out on best way to check this and then give to user useful message. <br/>&gt;&gt; <br/>&gt;&gt; For now - just install &#39;snit2&#39; into your tcl/tk. <br/>&gt;&gt; <br/>&gt;&gt; Best regards, Vadim. <br/>&gt; <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2014/01/msg664.html Fri, 17 Jan 2014 04:59:22 +0000 Re: Cant install Tcl::Tk by Richard Hainsworth Thanks Vadim for you quick reply.<br/><br/>I want to plot data I have generated. I can extract the data using perl <br/>since I know perl. I dont want to learn Tcl just to extract data so I <br/>can then plot it.<br/><br/>On 01/16/2014 01:41 PM, Konovalov, Vadim wrote:<br/>&gt; Thank you for your report, Indeed, there are items to fix, I&#39;ll do my <br/>&gt; best to fix and release by Jan, 19. Despite of this, you already have <br/>&gt; setup ready for the usage.<br/>&gt;&gt; I&#39;ve tried repeatedly to install TCL::Tk. I want to use BLT.<br/>&gt; BTW Tcl::Tk is pure-perl, but - indeed - its better to have clean install rather than &#39;force&#39; option.<br/>&gt; Yet, for using BLT Tcl::Tk isn&#39;t necessary, you can use BLT with just Tcl.pm module or Tkx,<br/>&gt;<br/>&gt; Like this:<br/>&gt;<br/>&gt; $interp-&gt;Eval(&lt;&lt;&#39;EOS&#39;);<br/>&gt; # tcl/tk code here<br/>&gt; package require Blt<br/>&gt; pack [text .t]<br/>&gt; # etc etc etc<br/>&gt; EOS<br/>I could figure most of this out. But what I dont know is how to populate <br/>data structures in Perl that can be used in Tcl.<br/><br/>What I need BLT is to created stacked barcharts. It seems that the only <br/>software to do this is GD, BLT and WXfreechart.<br/><br/>My solution so far is to generate GD images and then use Tk to display them.<br/>&gt; However if you&#39;re planning to use BLT with perl/Tk syntax - then Tcl::Tk is indeed needed.<br/>&gt;<br/>&gt; Cool, actually the Tcl CPAN module is the crucial point as a <br/>&gt; perl-to-tcl/tk bridge.<br/>&gt;&gt; CPAN.pm: Building V/VK/VKON/Tcl-Tk-1.04.tar.gz<br/>&gt; ....<br/>&gt;<br/>&gt;&gt; t/text.t ........ can&#39;t find package widget::scrolledwindow at<br/>&gt;&gt; /home/richard/.local/share/.cpan/build/Tcl-Tk-1.04-<br/>&gt;&gt; 2tDOWV/blib/lib/Tcl/Tk.pm<br/>&gt;&gt; line 794.<br/>&gt; This message means that your tcl/tk installation should also have snit2 or snit,<br/>&gt; because $widget-&gt;Scrolled(...) is implemented used &#39;snit&#39;.<br/>&gt;<br/>&gt; I will try to figure out on best way to check this and then give to user useful message.<br/>&gt;<br/>&gt; For now - just install &#39;snit2&#39; into your tcl/tk.<br/>&gt;<br/>&gt; Best regards, Vadim. <br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2014/01/msg663.html Thu, 16 Jan 2014 15:13:35 +0000 RE: Cant install Tcl::Tk by Konovalov, Vadim &gt; From: Richard Hainsworth <br/> <br/>&gt; On running cpan to get Tcl::Tk , cpan reports an error and requests the <br/>&gt; author be informed. <br/> <br/>Thank you for your report, <br/>Indeed, there are items to fix, I&#39;ll do my best to fix and release by Jan, 19. <br/> <br/>Despite of this, you already have setup ready for the usage. <br/> <br/>&gt; <br/>&gt; I&#39;ve tried repeatedly to install TCL::Tk. I want to use BLT. <br/> <br/>BTW Tcl::Tk is pure-perl, but - indeed - its better to have clean install rather than &#39;force&#39; option. <br/>Yet, for using BLT Tcl::Tk isn&#39;t necessary, you can use BLT with just Tcl.pm module or Tkx, <br/> <br/>Like this: <br/> <br/>$interp-&gt;Eval(&lt;&lt;&#39;EOS&#39;); <br/># tcl/tk code here <br/>package require Blt <br/>pack [text .t] <br/># etc etc etc <br/>EOS <br/> <br/>However if you&#39;re planning to use BLT with perl/Tk syntax - then Tcl::Tk is indeed needed. <br/> <br/>&gt; <br/>&gt; Below is the print out using cpan. <br/>&gt; <br/>&gt; I have Ubuntu 13.10 <br/>&gt; <br/>&gt; I have tried installing Tcl with synaptic, but there isnt an ubuntu package for <br/>&gt; Tcl::Tk. <br/>&gt; <br/>&gt; Also there is a library installed with BLT already and it can be accessed with <br/>&gt; tcl. <br/>&gt; <br/>&gt; CPAN.pm: Building V/VK/VKON/Tcl-1.02.tar.gz <br/> <br/>..... <br/> <br/>&gt; Result: PASS <br/>&gt; VKON/Tcl-1.02.tar.gz <br/>&gt; /usr/bin/make test -- OK <br/>&gt; Running make install <br/>.... <br/> <br/>Cool, <br/>actually the Tcl CPAN module is the crucial point as a perl-to-tcl/tk bridge. <br/> <br/> <br/>&gt; CPAN.pm: Building V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/> <br/>.... <br/> <br/>&gt; t/text.t ........ can&#39;t find package widget::scrolledwindow at <br/>&gt; /home/richard/.local/share/.cpan/build/Tcl-Tk-1.04- <br/>&gt; 2tDOWV/blib/lib/Tcl/Tk.pm <br/>&gt; line 794. <br/> <br/>This message means that your tcl/tk installation should also have snit2 or snit, <br/>because $widget-&gt;Scrolled(...) is implemented used &#39;snit&#39;. <br/> <br/>I will try to figure out on best way to check this and then give to user useful message. <br/> <br/>For now - just install &#39;snit2&#39; into your tcl/tk. <br/> <br/>&gt; t/text.t ........ Dubious, test returned 2 (wstat 512, 0x200) Failed 3/3 subtests <br/>&gt; t/tk-mw.t ....... ok t/unicode.t ..... ok t/zzPhoto.t ..... skipped: no Img <br/>&gt; extension available <br/> <br/>Best regards, <br/>Vadim. <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2014/01/msg662.html Thu, 16 Jan 2014 05:41:59 +0000 Cant install Tcl::Tk by Richard Hainsworth Dear Vadim, <br/> <br/>On running cpan to get Tcl::Tk , cpan reports an error and requests the <br/>author be informed. <br/> <br/>I&#39;ve tried repeatedly to install TCL::Tk. I want to use BLT. <br/> <br/>Below is the print out using cpan. <br/> <br/>I have Ubuntu 13.10 <br/> <br/>I have tried installing Tcl with synaptic, but there isnt an ubuntu <br/>package for Tcl::Tk. <br/> <br/>Also there is a library installed with BLT already and it can be <br/>accessed with tcl. <br/> <br/>I want to access BLT through Perl so that I can supply data. <br/> <br/>&lt;cpan response follows&gt; <br/> <br/>Module id = Tcl::Tk <br/>DESCRIPTION Complete access to Tk *via Tcl* <br/>CPAN_USERID MICB (Malcolm Beattie &lt;mbeattie@clueful.co.uk&gt;) <br/>CPAN_VERSION 1.04 <br/>CPAN_FILE V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/>UPLOAD_DATE 2011-02-20 <br/>DSLIP_STATUS RdcO? (released,developer,C,object-oriented,) <br/>INST_FILE (not installed) <br/> <br/> <br/>cpan[2]&gt; install Tcl::Tk <br/>Running install for module &#39;Tcl::Tk&#39; <br/>Running make for V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/>Fetching with LWP: <br/>ftp://cpan.rinet.ru/pub/mirror/CPAN/authors/id/V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/>Checksum for <br/>/home/richard/.local/share/.cpan/sources/authors/id/V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/>ok <br/>Scanning cache /home/richard/.local/share/.cpan/build for sizes <br/>............................................................................DONE <br/> <br/>CPAN.pm: Building V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/> <br/>Checking if your kit is complete... <br/>Warning: the following files are missing in your kit: <br/>demos/tcltkdb.pm <br/>Please inform the author. <br/>Warning: prerequisite Tcl 0.98 not found. <br/>Generating a Unix-style Makefile <br/>Writing Makefile for Tcl::Tk <br/>Writing MYMETA.yml and MYMETA.json <br/>---- Unsatisfied dependencies detected during ---- <br/>---- VKON/Tcl-Tk-1.04.tar.gz ---- <br/>Tcl [requires] <br/>Running make test <br/>Delayed until after prerequisites <br/>Running make install <br/>Delayed until after prerequisites <br/>Running install for module &#39;Tcl&#39; <br/>Running make for V/VK/VKON/Tcl-1.02.tar.gz <br/>Checksum for <br/>/home/richard/.local/share/.cpan/sources/authors/id/V/VK/VKON/Tcl-1.02.tar.gz <br/>ok <br/> <br/>CPAN.pm: Building V/VK/VKON/Tcl-1.02.tar.gz <br/> <br/>LIBS = -Ltcl-core/linux-x86_64 -ltclstub8.4 <br/>INC = -Itcl-core/include <br/>DEFINE = -DUSE_TCL_STUBS <br/>Checking if your kit is complete... <br/>Looks good <br/>Warning: -Ltcl-core/linux-x86_64 changed to <br/>-L/home/richard/.local/share/.cpan/build/Tcl-1.02-vhO3kN/tcl-core/linux-x86_64 <br/>Generating a Unix-style Makefile <br/>Writing Makefile for Tcl <br/>Writing MYMETA.yml and MYMETA.json <br/>cp Tcl.pm blib/lib/Tcl.pm <br/>Running Mkbootstrap for Tcl () <br/>chmod 644 Tcl.bs <br/>/usr/bin/perl /usr/local/share/perl/5.14.2/ExtUtils/xsubpp -typemap <br/>/usr/share/perl/5.14/ExtUtils/typemap -typemap typemap Tcl.xs &gt; Tcl.xsc <br/>&amp;&amp; mv Tcl.xsc Tcl.c <br/>Please specify prototyping behavior for Tcl.xs (see perlxs manual) <br/>cc -c -Itcl-core/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN <br/>-fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include <br/>-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\&quot;1.02\&quot; <br/>-DXS_VERSION=\&quot;1.02\&quot; -fPIC &quot;-I/usr/lib/perl/5.14/CORE&quot; -DUSE_TCL_STUBS <br/>Tcl.c <br/>Tcl.xs: In function &lsquo;NpLoadLibrary&rsquo;: <br/>Tcl.xs:216:3: warning: format not a string literal and no format <br/>arguments [-Wformat-security] <br/>warn(error); <br/>^ <br/>Tcl.xs: In function &lsquo;NpInitialize&rsquo;: <br/>Tcl.xs:402:3: warning: format not a string literal and no format <br/>arguments [-Wformat-security] <br/>warn(error); <br/>^ <br/>rm -f blib/arch/auto/Tcl/Tcl.so <br/>cc -shared -L/usr/local/lib -fstack-protector Tcl.o -o <br/>blib/arch/auto/Tcl/Tcl.so \ <br/>-L/home/richard/.local/share/.cpan/build/Tcl-1.02-vhO3kN/tcl-core/linux-x86_64 <br/>-ltclstub8.4 \ <br/> <br/>chmod 755 blib/arch/auto/Tcl/Tcl.so <br/>/usr/bin/perl -MExtUtils::Command::MM -e &#39;cp_nonempty&#39; -- Tcl.bs <br/>blib/arch/auto/Tcl/Tcl.bs 644 <br/>Manifying blib/man3/Tcl.3pm <br/>VKON/Tcl-1.02.tar.gz <br/>/usr/bin/make -- OK <br/>Running make test <br/>Running Mkbootstrap for Tcl () <br/>chmod 644 Tcl.bs <br/>PERL_DL_NONLAZY=1 /usr/bin/perl &quot;-MExtUtils::Command::MM&quot; <br/>&quot;-MTest::Harness&quot; &quot;-e&quot; &quot;undef *Test::Harness::Switches; test_harness(0, <br/>&#39;blib/lib&#39;, &#39;blib/arch&#39;)&quot; t/*.t <br/>t/call.t ........... ok <br/>t/constants.t ...... ok <br/>t/createcmd.t ...... ok <br/>t/eval.t ........... ok <br/>t/export_to_tcl.t .. ok <br/>t/info.t ........... ok <br/>t/result.t ......... ok <br/>t/subclass.t ....... ok <br/>t/trace.t .......... ok <br/>t/unicode.t ........ ok <br/>t/var.t ............ ok <br/>All tests successful. <br/>Files=11, Tests=62, 1 wallclock secs ( 0.07 usr 0.01 sys + 0.19 cusr <br/>0.05 csys = 0.32 CPU) <br/>Result: PASS <br/>VKON/Tcl-1.02.tar.gz <br/>/usr/bin/make test -- OK <br/>Running make install <br/>Files found in blib/arch: installing files in blib/lib into architecture <br/>dependent library tree <br/>Installing /usr/local/lib/perl/5.14.2/auto/Tcl/Tcl.so <br/>Installing /usr/local/lib/perl/5.14.2/Tcl.pm <br/>Appending installation info to /usr/lib/perl/5.14/perllocal.pod <br/>VKON/Tcl-1.02.tar.gz <br/>/usr/bin/make install -- OK <br/>Running make for V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/>Has already been unwrapped into directory <br/>/home/richard/.local/share/.cpan/build/Tcl-Tk-1.04-2tDOWV <br/> <br/>CPAN.pm: Building V/VK/VKON/Tcl-Tk-1.04.tar.gz <br/> <br/>cp lib/Tcl/Tk.pm blib/lib/Tcl/Tk.pm <br/>cp lib/Tcl/Tk/Widget/Text.pm blib/lib/Tcl/Tk/Widget/Text.pm <br/>cp lib/Tcl/Tk/Widget/Balloon.pm blib/lib/Tcl/Tk/Widget/Balloon.pm <br/>Manifying blib/man3/Tcl::Tk.3pm <br/>VKON/Tcl-Tk-1.04.tar.gz <br/>/usr/bin/make -- OK <br/>Running make test <br/>PERL_DL_NONLAZY=1 /usr/bin/perl &quot;-MExtUtils::Command::MM&quot; <br/>&quot;-MTest::Harness&quot; &quot;-e&quot; &quot;undef *Test::Harness::Switches; test_harness(0, <br/>&#39;blib/lib&#39;, &#39;blib/arch&#39;)&quot; t/*.t <br/>t/after.t ....... ok <br/>t/canvas.t ...... ok <br/>t/geomgr.t ...... ok <br/>t/optmenu.t ..... ok <br/>t/photo.t ....... skipped: no Img extension available (can&#39;t find <br/>package Img at <br/>/home/richard/.local/share/.cpan/build/Tcl-Tk-1.04-2tDOWV/blib/lib/Tcl/Tk.pm <br/>line 733. <br/>t/ptk-compat.t .. ok <br/>t/text.t ........ can&#39;t find package widget::scrolledwindow at <br/>/home/richard/.local/share/.cpan/build/Tcl-Tk-1.04-2tDOWV/blib/lib/Tcl/Tk.pm <br/>line 794. <br/>t/text.t ........ Dubious, test returned 2 (wstat 512, 0x200) <br/>Failed 3/3 subtests <br/>t/tk-mw.t ....... ok <br/>t/unicode.t ..... ok <br/>t/zzPhoto.t ..... skipped: no Img extension available <br/> <br/>Test Summary Report <br/>------------------- <br/>t/text.t (Wstat: 512 Tests: 0 Failed: 0) <br/>Non-zero exit status: 2 <br/>Parse errors: Bad plan. You planned 3 tests but ran 0. <br/>Files=10, Tests=56, 14 wallclock secs ( 0.10 usr 0.00 sys + 1.24 cusr <br/>0.17 csys = 1.51 CPU) <br/>Result: FAIL <br/>Failed 1/10 test programs. 0/56 subtests failed. <br/>make: *** [test_dynamic] Error 255 <br/>VKON/Tcl-Tk-1.04.tar.gz <br/>/usr/bin/make test -- NOT OK <br/>//hint// to see the cpan-testers results for installing this module, try: <br/>reports VKON/Tcl-Tk-1.04.tar.gz <br/>Running make install <br/>make test had returned bad status, won&#39;t install without force <br/>Failed during this command: <br/>VKON/Tcl-Tk-1.04.tar.gz : make_test NO <br/> <br/>cpan[3]&gt; <br/> <br/> <br/> http://www.nntp.perl.org/group/perl.tcltk/2014/01/msg661.html Wed, 15 Jan 2014 23:09:25 +0000 Registration Open for 19th Annual Tcl/Tk Conference (Tcl'2012) by Andreas Kupries 20&#39;th Annual Tcl/Tk Conference (Tcl&#39;2013)<br/>http://www.tcl.tk/community/tcl2013/<br/><br/>September 23 - 27, 2013<br/>Bourbon Orleans Hotel<br/>New Orleans, Louisiana, USA<br/>http://www.bourbonorleans.com/<br/><br/>I am pleased to announce that registration for the Conference is now<br/>open at<br/><br/> http://www.tcl.tk/community/tcl2013/reg.html<br/><br/>To book a room at the conference hotel at reduced rates please follow<br/>the instructions on that page. Note that the offer of reduced rates<br/>expires on August 19 (In 2 weeks). Book NOW.<br/><br/>Our schedule can be found at<br/><br/> http://www.tcl.tk/community/tcl2013/schedule.html<br/><br/>Conference Committee<br/><br/>Clif Flynt Noumena Corp General Chair, Website Admin<br/>Andreas Kupries ActiveState Software Inc. Program Chair<br/>Cyndy Lilagan Nat. Museum of Health &amp; Medicine, Chicago Site/Facilities Chair<br/>Arjen Markus Deltares<br/>Brian Griffin Mentor Graphics<br/>Donal Fellows University of Manchester<br/>Gerald Lester KnG Consulting, LLC<br/>Jeffrey Hobbs ActiveState Software Inc.<br/>Kevin Kenny GE Global Research Center<br/>Larry Virden<br/>Mike Doyle National Museum of Health &amp; Medicine, Chicago<br/>Ron Fox NSCL/FRIB Michigan State University<br/>Steve Landers Digital Smarties<br/><br/>Contact Information tclconference@googlegroups.com<br/><br/><br/>Tcl&#39;2012 would like to thank those who are sponsoring the conference:<br/><br/>ActiveState Software Inc.<br/>Buonacorsi Foundation<br/>Mentor Graphics<br/>Noumena Corp.<br/>SR Technology<br/>Tcl Community Association<br/><br/> http://www.nntp.perl.org/group/perl.tcltk/2013/08/msg660.html Wed, 07 Aug 2013 19:48:43 +0000 Re: getOpenFile() and high-ASCII characters by Scott Parrill Thanks for the tip. It&#39;s good to know that Tcl does everything in utf-8. <br/> <br/>I haven&#39;t had the need to localize this application yet but have been <br/>putting effort into writing it in such a way that it will lend itself to <br/>cross-platform compatibility and localization. <br/> <br/>Scott <br/> <br/> <br/>---------------------------------------------------------------------- <br/>Scott Parrill <br/>Information Technology Specialist <br/>Enterprise Technology Services / <br/>Wyoming State Geological Survey <br/>State of Wyoming <br/>P.O. Box 1347 <br/>Laramie, WY 82073 <br/>Phone: 307-766-2286 x242 <br/>Fax: 307-766-2605 <br/>E-mail: Scott.Parrill@wyo.gov&lt;https://uwmail.uwyo.edu/owa/redir.aspx?C=4dc4ce62e583463fb8ad86380018935b&amp;URL=mailto%3aScott.Parrill%40wyo.gov&gt; <br/>---------------------------------------------------------------------- <br/>E-Mail to and from me, in connection with the transaction of public <br/>business, is subject to the Wyoming Public Records Act and may be <br/>disclosed to third parties. <br/>---------------------------------------------------------------------- <br/> <br/> <br/> <br/> <br/> <br/> <br/>On Thu, Aug 1, 2013 at 1:39 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; wrote: <br/> <br/>&gt; Also note that you are dealing with the Perl&lt;&gt;Tcl bridge in this case. <br/>&gt; Tcl uses utf-8 exclusively under the covers, and will deliver that to <br/>&gt; Perl. This only will become important when you hit the funky filenames, <br/>&gt; but you&#39;ll get much more sensitive to it should you need to localize a user <br/>&gt; interface. <br/>&gt; <br/>&gt; Jeff <br/>&gt; <br/>&gt; On 2013-08-01, at 12:28 PM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; wrote: <br/>&gt; <br/>&gt; Well that explains why I&#39;ve never run across the problem before in the <br/>&gt; number of years I&#39;ve been working with Perl scripts. This is the fist <br/>&gt; major application I&#39;ve written with Tkx that had to do any file handling. <br/>&gt; Always before any file handling I did either didn&#39;t involve any of the <br/>&gt; oddball characters Windows allows in file names for used things like <br/>&gt; readdir to hide the behind-the-scenes-magic. <br/>&gt; <br/>&gt; It&#39;s amazing what you learn when things don&#39;t work as expected. :) <br/>&gt; <br/>&gt; Thanks again. <br/>&gt; Scott <br/>&gt; <br/>&gt; On Thu, Aug 1, 2013 at 1:14 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; wrote: <br/>&gt; <br/>&gt;&gt; Of course, I knew it would. ;) <br/>&gt;&gt; <br/>&gt;&gt; OpenFile1 is returning utf-8 encoded text, which needs the special <br/>&gt;&gt; Win32 functions. OpenFile2 is only obviating this with a special case <br/>&gt;&gt; in readdir() for directory contents. The regular Perl functions for <br/>&gt;&gt; file handling are otherwise not capable of general unicode-containing <br/>&gt;&gt; filename operations on Windows. <br/>&gt;&gt; <br/>&gt;&gt; Jeff <br/>&gt;&gt; <br/>&gt;&gt; On Thu, Aug 1, 2013 at 12:07 PM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt;&gt; wrote: <br/>&gt;&gt; &gt; Jeff, <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; Interestingly enough, it appears that Win32::Unicode::File does actually <br/>&gt;&gt; &gt; seem to solve the problem. I changed OpenFile1 to <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; sub OpenFile1 { <br/>&gt;&gt; &gt; my $filename = Tkx::tk___getOpenFile(); <br/>&gt;&gt; &gt; print $filename . &quot;\n&quot;; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; @list = statW($filename); <br/>&gt;&gt; &gt; print Dumper(\@list); <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; $fh = Win32::Unicode::File-&gt;new(); <br/>&gt;&gt; &gt; $fh-&gt;open(&#39;&lt;&#39;, $filename) or die; <br/>&gt;&gt; &gt; while ($line = $fh-&gt;readline()) { <br/>&gt;&gt; &gt; print $line; <br/>&gt;&gt; &gt; } <br/>&gt;&gt; &gt; } <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; And the file opened and displayed correctly. How COOL! <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; Thanks, <br/>&gt;&gt; &gt; Scott <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; ---------------------------------------------------------------------- <br/>&gt;&gt; &gt; Scott Parrill <br/>&gt;&gt; &gt; Information Technology Specialist <br/>&gt;&gt; &gt; Enterprise Technology Services / <br/>&gt;&gt; &gt; Wyoming State Geological Survey <br/>&gt;&gt; &gt; State of Wyoming <br/>&gt;&gt; &gt; P.O. Box 1347 <br/>&gt;&gt; &gt; Laramie, WY 82073 <br/>&gt;&gt; &gt; Phone: 307-766-2286 x242 <br/>&gt;&gt; &gt; Fax: 307-766-2605 <br/>&gt;&gt; &gt; E-mail: Scott.Parrill@wyo.gov <br/>&gt;&gt; &gt; ---------------------------------------------------------------------- <br/>&gt;&gt; &gt; E-Mail to and from me, in connection with the transaction of public <br/>&gt;&gt; &gt; business, is subject to the Wyoming Public Records Act and may be <br/>&gt;&gt; &gt; disclosed to third parties. <br/>&gt;&gt; &gt; ---------------------------------------------------------------------- <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt; On Thu, Aug 1, 2013 at 10:01 AM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt;&gt; &gt; wrote: <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; Jeff, <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; The print statement in OpenFile1 and OpenFile2 display different <br/>&gt;&gt; &gt;&gt; characters when opening the same file. OpenFile1 prints &quot;&#x255E;&AElig;.txt&quot; <br/>&gt;&gt; where as <br/>&gt;&gt; &gt;&gt; OpenFile2 prints &quot;&acirc;.txt&quot;. Incidentally, the Windows dir command and <br/>&gt;&gt; Windows <br/>&gt;&gt; &gt;&gt; Explorer display the file name as &quot;&fnof;.txt&quot;. <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; The difference between the way the file name prints between the <br/>&gt;&gt; OpenFile1 <br/>&gt;&gt; &gt;&gt; (which fails to open the file) and OpenFile2 (which correctly opens the <br/>&gt;&gt; &gt;&gt; file) makes me think this is problem in the Tkx::tk___getOpenFile() <br/>&gt;&gt; &gt;&gt; function. <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; The difference between the way OpenFile2 and the Windows dir command <br/>&gt;&gt; &gt;&gt; display the file name is most likely a Unicode translation problem <br/>&gt;&gt; which is <br/>&gt;&gt; &gt;&gt; only an issue when I try to store the file name in a database or <br/>&gt;&gt; something <br/>&gt;&gt; &gt;&gt; of the sort. (I&#39;ll eventually have to work this one out as well.) <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; Scott <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; <br/>&gt;&gt; &gt;&gt; On Wed, Jul 31, 2013 at 6:13 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; <br/>&gt;&gt; wrote: <br/>&gt;&gt; &gt;&gt;&gt; <br/>&gt;&gt; &gt;&gt;&gt; It is my understanding that on Windows, you need to use <br/>&gt;&gt; &gt;&gt;&gt; Win32::Unicode::File/Dir functions to manipulate unicode filenames. <br/>&gt;&gt; &gt;&gt;&gt; If you print out (or display in Unicode-compliant way) $filename <br/>&gt;&gt; &gt;&gt;&gt; before the stat() call, does it show the right unicode? If so, try <br/>&gt;&gt; &gt;&gt;&gt; the Win32::Unicode alternatives. <br/>&gt;&gt; &gt;&gt;&gt; <br/>&gt;&gt; &gt;&gt;&gt; Jeff <br/>&gt;&gt; &gt;&gt;&gt; <br/>&gt;&gt; &gt;&gt;&gt; On Wed, Jul 31, 2013 at 9:03 AM, Scott Parrill &lt;scott.parrill@wyo.gov <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; wrote: <br/>&gt;&gt; &gt;&gt;&gt; &gt; I&#39;ve noted that the Tkx::tk__getOpenFile function does not seem to <br/>&gt;&gt; like <br/>&gt;&gt; &gt;&gt;&gt; &gt; high-ASCII characters in file names on Windows. (I haven&#39;t had an <br/>&gt;&gt; &gt;&gt;&gt; &gt; opportunity to test this on non-Windows platforms at this point.) <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; Given the following code: <br/>&gt;&gt; &gt;&gt;&gt; &gt; --------------------------------------- <br/>&gt;&gt; &gt;&gt;&gt; &gt; use feature &#39;unicode_strings&#39;; <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; use Encode qw(encode decode); <br/>&gt;&gt; &gt;&gt;&gt; &gt; use Data::Dumper; <br/>&gt;&gt; &gt;&gt;&gt; &gt; use Tkx; <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; sub OpenFile1 { <br/>&gt;&gt; &gt;&gt;&gt; &gt; my $filename = Tkx::tk___getOpenFile(); <br/>&gt;&gt; &gt;&gt;&gt; &gt; @list = stat($filename); <br/>&gt;&gt; &gt;&gt;&gt; &gt; print Dumper(\@list); <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; open IN, &quot;&lt;&quot;, $filename or die; <br/>&gt;&gt; &gt;&gt;&gt; &gt; while ($line = &lt;IN&gt;) { <br/>&gt;&gt; &gt;&gt;&gt; &gt; print $line; <br/>&gt;&gt; &gt;&gt;&gt; &gt; } <br/>&gt;&gt; &gt;&gt;&gt; &gt; close IN; <br/>&gt;&gt; &gt;&gt;&gt; &gt; } <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; sub OpenFile2 { <br/>&gt;&gt; &gt;&gt;&gt; &gt; opendir DIR, &quot;.&quot;; <br/>&gt;&gt; &gt;&gt;&gt; &gt; while ($filename = readdir(DIR)) { <br/>&gt;&gt; &gt;&gt;&gt; &gt; next if ($filename eq &#39;.&#39; or $filename eq &#39;..&#39;); <br/>&gt;&gt; &gt;&gt;&gt; &gt; if ($filename =~ /txt$/) { <br/>&gt;&gt; &gt;&gt;&gt; &gt; @list = stat($filename); <br/>&gt;&gt; &gt;&gt;&gt; &gt; print Dumper(\@list); <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; open IN, &quot;&lt;&quot;, $filename or die; <br/>&gt;&gt; &gt;&gt;&gt; &gt; while ($line = &lt;IN&gt;) { <br/>&gt;&gt; &gt;&gt;&gt; &gt; print $line; <br/>&gt;&gt; &gt;&gt;&gt; &gt; } <br/>&gt;&gt; &gt;&gt;&gt; &gt; close IN; <br/>&gt;&gt; &gt;&gt;&gt; &gt; } <br/>&gt;&gt; &gt;&gt;&gt; &gt; } <br/>&gt;&gt; &gt;&gt;&gt; &gt; } <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; $mw = Tkx::widget-&gt;new(&quot;.&quot;); <br/>&gt;&gt; &gt;&gt;&gt; &gt; $b = $mw-&gt;new_ttk__button(-text =&gt; &#39;Open File 1&#39;, <br/>&gt;&gt; &gt;&gt;&gt; &gt; -command =&gt; sub { OpenFile1() }, <br/>&gt;&gt; &gt;&gt;&gt; &gt; ); <br/>&gt;&gt; &gt;&gt;&gt; &gt; $b-&gt;g_pack(); <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; $b2 = $mw-&gt;new_ttk__button(-text =&gt; &#39;Open File 2&#39;, <br/>&gt;&gt; &gt;&gt;&gt; &gt; -command =&gt; sub { OpenFile2() }, <br/>&gt;&gt; &gt;&gt;&gt; &gt; ); <br/>&gt;&gt; &gt;&gt;&gt; &gt; $b2-&gt;g_pack(); <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; Tkx::MainLoop(); <br/>&gt;&gt; &gt;&gt;&gt; &gt; --------------------------------------- <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; Now create a file in the working directory, so that OpenFile2() will <br/>&gt;&gt; &gt;&gt;&gt; &gt; find <br/>&gt;&gt; &gt;&gt;&gt; &gt; it, with a name containing a high-ASCII character (I used <br/>&gt;&gt; &gt;&gt;&gt; &gt; &quot;\x{0092}.txt&quot;). <br/>&gt;&gt; &gt;&gt;&gt; &gt; What I have found is that the OpenFile1() button will die on the <br/>&gt;&gt; &quot;open <br/>&gt;&gt; &gt;&gt;&gt; &gt; IN,...&quot; statement at line 12 and the stat() function, on line 9, <br/>&gt;&gt; &gt;&gt;&gt; &gt; returns no <br/>&gt;&gt; &gt;&gt;&gt; &gt; data. However, the OpenFile2() function will correctly open and <br/>&gt;&gt; read <br/>&gt;&gt; &gt;&gt;&gt; &gt; the <br/>&gt;&gt; &gt;&gt;&gt; &gt; file and the stat() function, on line 24, returns correct data for <br/>&gt;&gt; the <br/>&gt;&gt; &gt;&gt;&gt; &gt; file. <br/>&gt;&gt; &gt;&gt;&gt; &gt; Using a file with unicode charaters in the name (like <br/>&gt;&gt; &quot;\x{0289}.txt&quot;) <br/>&gt;&gt; &gt;&gt;&gt; &gt; seems <br/>&gt;&gt; &gt;&gt;&gt; &gt; to work correctly in both OpenFile1() and OpenFile2(). <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; Does anyone have a suggestion on how to either get the <br/>&gt;&gt; &gt;&gt;&gt; &gt; Tkx::tk__getOpenFile() to return the file name correctly or how to <br/>&gt;&gt; work <br/>&gt;&gt; &gt;&gt;&gt; &gt; around the problem? <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; &gt;&gt;&gt; &gt; Thanks, <br/>&gt;&gt; &gt;&gt;&gt; &gt; Scott <br/>&gt;&gt; &gt;&gt;&gt; &gt; <br/>&gt;&gt; <br/>&gt; <br/> <br/> <br/>E-Mail to and from me, in connection with the transaction <br/>of public business, is subject to the Wyoming Public Records <br/>Act and may be disclosed to third parties. <br/> http://www.nntp.perl.org/group/perl.tcltk/2013/08/msg659.html Thu, 01 Aug 2013 19:53:27 +0000 Re: getOpenFile() and high-ASCII characters by Jeff Hobbs Also note that you are dealing with the Perl&lt;&gt;Tcl bridge in this case. Tcl uses utf-8 exclusively under the covers, and will deliver that to Perl. This only will become important when you hit the funky filenames, but you&#39;ll get much more sensitive to it should you need to localize a user interface. <br/> <br/>Jeff <br/> <br/>On 2013-08-01, at 12:28 PM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; wrote: <br/> <br/>&gt; Well that explains why I&#39;ve never run across the problem before in the number of years I&#39;ve been working with Perl scripts. This is the fist major application I&#39;ve written with Tkx that had to do any file handling. Always before any file handling I did either didn&#39;t involve any of the oddball characters Windows allows in file names for used things like readdir to hide the behind-the-scenes-magic. <br/>&gt; <br/>&gt; It&#39;s amazing what you learn when things don&#39;t work as expected. :) <br/>&gt; <br/>&gt; Thanks again. <br/>&gt; Scott <br/>&gt; <br/>&gt; On Thu, Aug 1, 2013 at 1:14 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; wrote: <br/>&gt; Of course, I knew it would. ;) <br/>&gt; <br/>&gt; OpenFile1 is returning utf-8 encoded text, which needs the special <br/>&gt; Win32 functions. OpenFile2 is only obviating this with a special case <br/>&gt; in readdir() for directory contents. The regular Perl functions for <br/>&gt; file handling are otherwise not capable of general unicode-containing <br/>&gt; filename operations on Windows. <br/>&gt; <br/>&gt; Jeff <br/>&gt; <br/>&gt; On Thu, Aug 1, 2013 at 12:07 PM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; wrote: <br/>&gt; &gt; Jeff, <br/>&gt; &gt; <br/>&gt; &gt; Interestingly enough, it appears that Win32::Unicode::File does actually <br/>&gt; &gt; seem to solve the problem. I changed OpenFile1 to <br/>&gt; &gt; <br/>&gt; &gt; sub OpenFile1 { <br/>&gt; &gt; my $filename = Tkx::tk___getOpenFile(); <br/>&gt; &gt; print $filename . &quot;\n&quot;; <br/>&gt; &gt; <br/>&gt; &gt; @list = statW($filename); <br/>&gt; &gt; print Dumper(\@list); <br/>&gt; &gt; <br/>&gt; &gt; $fh = Win32::Unicode::File-&gt;new(); <br/>&gt; &gt; $fh-&gt;open(&#39;&lt;&#39;, $filename) or die; <br/>&gt; &gt; while ($line = $fh-&gt;readline()) { <br/>&gt; &gt; print $line; <br/>&gt; &gt; } <br/>&gt; &gt; } <br/>&gt; &gt; <br/>&gt; &gt; And the file opened and displayed correctly. How COOL! <br/>&gt; &gt; <br/>&gt; &gt; Thanks, <br/>&gt; &gt; Scott <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; ---------------------------------------------------------------------- <br/>&gt; &gt; Scott Parrill <br/>&gt; &gt; Information Technology Specialist <br/>&gt; &gt; Enterprise Technology Services / <br/>&gt; &gt; Wyoming State Geological Survey <br/>&gt; &gt; State of Wyoming <br/>&gt; &gt; P.O. Box 1347 <br/>&gt; &gt; Laramie, WY 82073 <br/>&gt; &gt; Phone: 307-766-2286 x242 <br/>&gt; &gt; Fax: 307-766-2605 <br/>&gt; &gt; E-mail: Scott.Parrill@wyo.gov <br/>&gt; &gt; ---------------------------------------------------------------------- <br/>&gt; &gt; E-Mail to and from me, in connection with the transaction of public <br/>&gt; &gt; business, is subject to the Wyoming Public Records Act and may be <br/>&gt; &gt; disclosed to third parties. <br/>&gt; &gt; ---------------------------------------------------------------------- <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; On Thu, Aug 1, 2013 at 10:01 AM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt; &gt; wrote: <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; Jeff, <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; The print statement in OpenFile1 and OpenFile2 display different <br/>&gt; &gt;&gt; characters when opening the same file. OpenFile1 prints &quot;&#x255E;&AElig;.txt&quot; where as <br/>&gt; &gt;&gt; OpenFile2 prints &quot;&acirc;.txt&quot;. Incidentally, the Windows dir command and Windows <br/>&gt; &gt;&gt; Explorer display the file name as &quot;&fnof;.txt&quot;. <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; The difference between the way the file name prints between the OpenFile1 <br/>&gt; &gt;&gt; (which fails to open the file) and OpenFile2 (which correctly opens the <br/>&gt; &gt;&gt; file) makes me think this is problem in the Tkx::tk___getOpenFile() <br/>&gt; &gt;&gt; function. <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; The difference between the way OpenFile2 and the Windows dir command <br/>&gt; &gt;&gt; display the file name is most likely a Unicode translation problem which is <br/>&gt; &gt;&gt; only an issue when I try to store the file name in a database or something <br/>&gt; &gt;&gt; of the sort. (I&#39;ll eventually have to work this one out as well.) <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; Scott <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; On Wed, Jul 31, 2013 at 6:13 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; wrote: <br/>&gt; &gt;&gt;&gt; <br/>&gt; &gt;&gt;&gt; It is my understanding that on Windows, you need to use <br/>&gt; &gt;&gt;&gt; Win32::Unicode::File/Dir functions to manipulate unicode filenames. <br/>&gt; &gt;&gt;&gt; If you print out (or display in Unicode-compliant way) $filename <br/>&gt; &gt;&gt;&gt; before the stat() call, does it show the right unicode? If so, try <br/>&gt; &gt;&gt;&gt; the Win32::Unicode alternatives. <br/>&gt; &gt;&gt;&gt; <br/>&gt; &gt;&gt;&gt; Jeff <br/>&gt; &gt;&gt;&gt; <br/>&gt; &gt;&gt;&gt; On Wed, Jul 31, 2013 at 9:03 AM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt; &gt;&gt;&gt; wrote: <br/>&gt; &gt;&gt;&gt; &gt; I&#39;ve noted that the Tkx::tk__getOpenFile function does not seem to like <br/>&gt; &gt;&gt;&gt; &gt; high-ASCII characters in file names on Windows. (I haven&#39;t had an <br/>&gt; &gt;&gt;&gt; &gt; opportunity to test this on non-Windows platforms at this point.) <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Given the following code: <br/>&gt; &gt;&gt;&gt; &gt; --------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; use feature &#39;unicode_strings&#39;; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; use Encode qw(encode decode); <br/>&gt; &gt;&gt;&gt; &gt; use Data::Dumper; <br/>&gt; &gt;&gt;&gt; &gt; use Tkx; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; sub OpenFile1 { <br/>&gt; &gt;&gt;&gt; &gt; my $filename = Tkx::tk___getOpenFile(); <br/>&gt; &gt;&gt;&gt; &gt; @list = stat($filename); <br/>&gt; &gt;&gt;&gt; &gt; print Dumper(\@list); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; open IN, &quot;&lt;&quot;, $filename or die; <br/>&gt; &gt;&gt;&gt; &gt; while ($line = &lt;IN&gt;) { <br/>&gt; &gt;&gt;&gt; &gt; print $line; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; close IN; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; sub OpenFile2 { <br/>&gt; &gt;&gt;&gt; &gt; opendir DIR, &quot;.&quot;; <br/>&gt; &gt;&gt;&gt; &gt; while ($filename = readdir(DIR)) { <br/>&gt; &gt;&gt;&gt; &gt; next if ($filename eq &#39;.&#39; or $filename eq &#39;..&#39;); <br/>&gt; &gt;&gt;&gt; &gt; if ($filename =~ /txt$/) { <br/>&gt; &gt;&gt;&gt; &gt; @list = stat($filename); <br/>&gt; &gt;&gt;&gt; &gt; print Dumper(\@list); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; open IN, &quot;&lt;&quot;, $filename or die; <br/>&gt; &gt;&gt;&gt; &gt; while ($line = &lt;IN&gt;) { <br/>&gt; &gt;&gt;&gt; &gt; print $line; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; close IN; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; $mw = Tkx::widget-&gt;new(&quot;.&quot;); <br/>&gt; &gt;&gt;&gt; &gt; $b = $mw-&gt;new_ttk__button(-text =&gt; &#39;Open File 1&#39;, <br/>&gt; &gt;&gt;&gt; &gt; -command =&gt; sub { OpenFile1() }, <br/>&gt; &gt;&gt;&gt; &gt; ); <br/>&gt; &gt;&gt;&gt; &gt; $b-&gt;g_pack(); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; $b2 = $mw-&gt;new_ttk__button(-text =&gt; &#39;Open File 2&#39;, <br/>&gt; &gt;&gt;&gt; &gt; -command =&gt; sub { OpenFile2() }, <br/>&gt; &gt;&gt;&gt; &gt; ); <br/>&gt; &gt;&gt;&gt; &gt; $b2-&gt;g_pack(); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Tkx::MainLoop(); <br/>&gt; &gt;&gt;&gt; &gt; --------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Now create a file in the working directory, so that OpenFile2() will <br/>&gt; &gt;&gt;&gt; &gt; find <br/>&gt; &gt;&gt;&gt; &gt; it, with a name containing a high-ASCII character (I used <br/>&gt; &gt;&gt;&gt; &gt; &quot;\x{0092}.txt&quot;). <br/>&gt; &gt;&gt;&gt; &gt; What I have found is that the OpenFile1() button will die on the &quot;open <br/>&gt; &gt;&gt;&gt; &gt; IN,...&quot; statement at line 12 and the stat() function, on line 9, <br/>&gt; &gt;&gt;&gt; &gt; returns no <br/>&gt; &gt;&gt;&gt; &gt; data. However, the OpenFile2() function will correctly open and read <br/>&gt; &gt;&gt;&gt; &gt; the <br/>&gt; &gt;&gt;&gt; &gt; file and the stat() function, on line 24, returns correct data for the <br/>&gt; &gt;&gt;&gt; &gt; file. <br/>&gt; &gt;&gt;&gt; &gt; Using a file with unicode charaters in the name (like &quot;\x{0289}.txt&quot;) <br/>&gt; &gt;&gt;&gt; &gt; seems <br/>&gt; &gt;&gt;&gt; &gt; to work correctly in both OpenFile1() and OpenFile2(). <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Does anyone have a suggestion on how to either get the <br/>&gt; &gt;&gt;&gt; &gt; Tkx::tk__getOpenFile() to return the file name correctly or how to work <br/>&gt; &gt;&gt;&gt; &gt; around the problem? <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Thanks, <br/>&gt; &gt;&gt;&gt; &gt; Scott <br/>&gt; &gt;&gt;&gt; &gt; http://www.nntp.perl.org/group/perl.tcltk/2013/08/msg658.html Thu, 01 Aug 2013 19:39:29 +0000 Re: getOpenFile() and high-ASCII characters by Scott Parrill Well that explains why I&#39;ve never run across the problem before in the <br/>number of years I&#39;ve been working with Perl scripts. This is the fist <br/>major application I&#39;ve written with Tkx that had to do any file handling. <br/> Always before any file handling I did either didn&#39;t involve any of the <br/>oddball characters Windows allows in file names for used things like <br/>readdir to hide the behind-the-scenes-magic. <br/> <br/>It&#39;s amazing what you learn when things don&#39;t work as expected. :) <br/> <br/>Thanks again. <br/>Scott <br/> <br/> <br/>---------------------------------------------------------------------- <br/>Scott Parrill <br/>Information Technology Specialist <br/>Enterprise Technology Services / <br/>Wyoming State Geological Survey <br/>State of Wyoming <br/>P.O. Box 1347 <br/>Laramie, WY 82073 <br/>Phone: 307-766-2286 x242 <br/>Fax: 307-766-2605 <br/>E-mail: Scott.Parrill@wyo.gov&lt;https://uwmail.uwyo.edu/owa/redir.aspx?C=4dc4ce62e583463fb8ad86380018935b&amp;URL=mailto%3aScott.Parrill%40wyo.gov&gt; <br/>---------------------------------------------------------------------- <br/>E-Mail to and from me, in connection with the transaction of public <br/>business, is subject to the Wyoming Public Records Act and may be <br/>disclosed to third parties. <br/>---------------------------------------------------------------------- <br/> <br/> <br/> <br/> <br/> <br/> <br/>On Thu, Aug 1, 2013 at 1:14 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; wrote: <br/> <br/>&gt; Of course, I knew it would. ;) <br/>&gt; <br/>&gt; OpenFile1 is returning utf-8 encoded text, which needs the special <br/>&gt; Win32 functions. OpenFile2 is only obviating this with a special case <br/>&gt; in readdir() for directory contents. The regular Perl functions for <br/>&gt; file handling are otherwise not capable of general unicode-containing <br/>&gt; filename operations on Windows. <br/>&gt; <br/>&gt; Jeff <br/>&gt; <br/>&gt; On Thu, Aug 1, 2013 at 12:07 PM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt; wrote: <br/>&gt; &gt; Jeff, <br/>&gt; &gt; <br/>&gt; &gt; Interestingly enough, it appears that Win32::Unicode::File does actually <br/>&gt; &gt; seem to solve the problem. I changed OpenFile1 to <br/>&gt; &gt; <br/>&gt; &gt; sub OpenFile1 { <br/>&gt; &gt; my $filename = Tkx::tk___getOpenFile(); <br/>&gt; &gt; print $filename . &quot;\n&quot;; <br/>&gt; &gt; <br/>&gt; &gt; @list = statW($filename); <br/>&gt; &gt; print Dumper(\@list); <br/>&gt; &gt; <br/>&gt; &gt; $fh = Win32::Unicode::File-&gt;new(); <br/>&gt; &gt; $fh-&gt;open(&#39;&lt;&#39;, $filename) or die; <br/>&gt; &gt; while ($line = $fh-&gt;readline()) { <br/>&gt; &gt; print $line; <br/>&gt; &gt; } <br/>&gt; &gt; } <br/>&gt; &gt; <br/>&gt; &gt; And the file opened and displayed correctly. How COOL! <br/>&gt; &gt; <br/>&gt; &gt; Thanks, <br/>&gt; &gt; Scott <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; ---------------------------------------------------------------------- <br/>&gt; &gt; Scott Parrill <br/>&gt; &gt; Information Technology Specialist <br/>&gt; &gt; Enterprise Technology Services / <br/>&gt; &gt; Wyoming State Geological Survey <br/>&gt; &gt; State of Wyoming <br/>&gt; &gt; P.O. Box 1347 <br/>&gt; &gt; Laramie, WY 82073 <br/>&gt; &gt; Phone: 307-766-2286 x242 <br/>&gt; &gt; Fax: 307-766-2605 <br/>&gt; &gt; E-mail: Scott.Parrill@wyo.gov <br/>&gt; &gt; ---------------------------------------------------------------------- <br/>&gt; &gt; E-Mail to and from me, in connection with the transaction of public <br/>&gt; &gt; business, is subject to the Wyoming Public Records Act and may be <br/>&gt; &gt; disclosed to third parties. <br/>&gt; &gt; ---------------------------------------------------------------------- <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; On Thu, Aug 1, 2013 at 10:01 AM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt; &gt; wrote: <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; Jeff, <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; The print statement in OpenFile1 and OpenFile2 display different <br/>&gt; &gt;&gt; characters when opening the same file. OpenFile1 prints &quot;&#x255E;&AElig;.txt&quot; where <br/>&gt; as <br/>&gt; &gt;&gt; OpenFile2 prints &quot;&acirc;.txt&quot;. Incidentally, the Windows dir command and <br/>&gt; Windows <br/>&gt; &gt;&gt; Explorer display the file name as &quot;&fnof;.txt&quot;. <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; The difference between the way the file name prints between the <br/>&gt; OpenFile1 <br/>&gt; &gt;&gt; (which fails to open the file) and OpenFile2 (which correctly opens the <br/>&gt; &gt;&gt; file) makes me think this is problem in the Tkx::tk___getOpenFile() <br/>&gt; &gt;&gt; function. <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; The difference between the way OpenFile2 and the Windows dir command <br/>&gt; &gt;&gt; display the file name is most likely a Unicode translation problem <br/>&gt; which is <br/>&gt; &gt;&gt; only an issue when I try to store the file name in a database or <br/>&gt; something <br/>&gt; &gt;&gt; of the sort. (I&#39;ll eventually have to work this one out as well.) <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; Scott <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; ---------------------------------------------------------------------- <br/>&gt; &gt;&gt; Scott Parrill <br/>&gt; &gt;&gt; Information Technology Specialist <br/>&gt; &gt;&gt; Enterprise Technology Services / <br/>&gt; &gt;&gt; Wyoming State Geological Survey <br/>&gt; &gt;&gt; State of Wyoming <br/>&gt; &gt;&gt; P.O. Box 1347 <br/>&gt; &gt;&gt; Laramie, WY 82073 <br/>&gt; &gt;&gt; Phone: 307-766-2286 x242 <br/>&gt; &gt;&gt; Fax: 307-766-2605 <br/>&gt; &gt;&gt; E-mail: Scott.Parrill@wyo.gov <br/>&gt; &gt;&gt; ---------------------------------------------------------------------- <br/>&gt; &gt;&gt; E-Mail to and from me, in connection with the transaction of public <br/>&gt; &gt;&gt; business, is subject to the Wyoming Public Records Act and may be <br/>&gt; &gt;&gt; disclosed to third parties. <br/>&gt; &gt;&gt; ---------------------------------------------------------------------- <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; On Wed, Jul 31, 2013 at 6:13 PM, Jeff Hobbs &lt;jeffh@activestate.com&gt; <br/>&gt; wrote: <br/>&gt; &gt;&gt;&gt; <br/>&gt; &gt;&gt;&gt; It is my understanding that on Windows, you need to use <br/>&gt; &gt;&gt;&gt; Win32::Unicode::File/Dir functions to manipulate unicode filenames. <br/>&gt; &gt;&gt;&gt; If you print out (or display in Unicode-compliant way) $filename <br/>&gt; &gt;&gt;&gt; before the stat() call, does it show the right unicode? If so, try <br/>&gt; &gt;&gt;&gt; the Win32::Unicode alternatives. <br/>&gt; &gt;&gt;&gt; <br/>&gt; &gt;&gt;&gt; Jeff <br/>&gt; &gt;&gt;&gt; <br/>&gt; &gt;&gt;&gt; On Wed, Jul 31, 2013 at 9:03 AM, Scott Parrill &lt;scott.parrill@wyo.gov&gt; <br/>&gt; &gt;&gt;&gt; wrote: <br/>&gt; &gt;&gt;&gt; &gt; I&#39;ve noted that the Tkx::tk__getOpenFile function does not seem to <br/>&gt; like <br/>&gt; &gt;&gt;&gt; &gt; high-ASCII characters in file names on Windows. (I haven&#39;t had an <br/>&gt; &gt;&gt;&gt; &gt; opportunity to test this on non-Windows platforms at this point.) <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Given the following code: <br/>&gt; &gt;&gt;&gt; &gt; --------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; use feature &#39;unicode_strings&#39;; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; use Encode qw(encode decode); <br/>&gt; &gt;&gt;&gt; &gt; use Data::Dumper; <br/>&gt; &gt;&gt;&gt; &gt; use Tkx; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; sub OpenFile1 { <br/>&gt; &gt;&gt;&gt; &gt; my $filename = Tkx::tk___getOpenFile(); <br/>&gt; &gt;&gt;&gt; &gt; @list = stat($filename); <br/>&gt; &gt;&gt;&gt; &gt; print Dumper(\@list); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; open IN, &quot;&lt;&quot;, $filename or die; <br/>&gt; &gt;&gt;&gt; &gt; while ($line = &lt;IN&gt;) { <br/>&gt; &gt;&gt;&gt; &gt; print $line; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; close IN; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; sub OpenFile2 { <br/>&gt; &gt;&gt;&gt; &gt; opendir DIR, &quot;.&quot;; <br/>&gt; &gt;&gt;&gt; &gt; while ($filename = readdir(DIR)) { <br/>&gt; &gt;&gt;&gt; &gt; next if ($filename eq &#39;.&#39; or $filename eq &#39;..&#39;); <br/>&gt; &gt;&gt;&gt; &gt; if ($filename =~ /txt$/) { <br/>&gt; &gt;&gt;&gt; &gt; @list = stat($filename); <br/>&gt; &gt;&gt;&gt; &gt; print Dumper(\@list); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; open IN, &quot;&lt;&quot;, $filename or die; <br/>&gt; &gt;&gt;&gt; &gt; while ($line = &lt;IN&gt;) { <br/>&gt; &gt;&gt;&gt; &gt; print $line; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; close IN; <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; } <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; $mw = Tkx::widget-&gt;new(&quot;.&quot;); <br/>&gt; &gt;&gt;&gt; &gt; $b = $mw-&gt;new_ttk__button(-text =&gt; &#39;Open File 1&#39;, <br/>&gt; &gt;&gt;&gt; &gt; -command =&gt; sub { OpenFile1() }, <br/>&gt; &gt;&gt;&gt; &gt; ); <br/>&gt; &gt;&gt;&gt; &gt; $b-&gt;g_pack(); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; $b2 = $mw-&gt;new_ttk__button(-text =&gt; &#39;Open File 2&#39;, <br/>&gt; &gt;&gt;&gt; &gt; -command =&gt; sub { OpenFile2() }, <br/>&gt; &gt;&gt;&gt; &gt; ); <br/>&gt; &gt;&gt;&gt; &gt; $b2-&gt;g_pack(); <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Tkx::MainLoop(); <br/>&gt; &gt;&gt;&gt; &gt; --------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Now create a file in the working directory, so that OpenFile2() will <br/>&gt; &gt;&gt;&gt; &gt; find <br/>&gt; &gt;&gt;&gt; &gt; it, with a name containing a high-ASCII character (I used <br/>&gt; &gt;&gt;&gt; &gt; &quot;\x{0092}.txt&quot;). <br/>&gt; &gt;&gt;&gt; &gt; What I have found is that the OpenFile1() button will die on the <br/>&gt; &quot;open <br/>&gt; &gt;&gt;&gt; &gt; IN,...&quot; statement at line 12 and the stat() function, on line 9, <br/>&gt; &gt;&gt;&gt; &gt; returns no <br/>&gt; &gt;&gt;&gt; &gt; data. However, the OpenFile2() function will correctly open and read <br/>&gt; &gt;&gt;&gt; &gt; the <br/>&gt; &gt;&gt;&gt; &gt; file and the stat() function, on line 24, returns correct data for <br/>&gt; the <br/>&gt; &gt;&gt;&gt; &gt; file. <br/>&gt; &gt;&gt;&gt; &gt; Using a file with unicode charaters in the name (like &quot;\x{0289}.txt&quot;) <br/>&gt; &gt;&gt;&gt; &gt; seems <br/>&gt; &gt;&gt;&gt; &gt; to work correctly in both OpenFile1() and OpenFile2(). <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Does anyone have a suggestion on how to either get the <br/>&gt; &gt;&gt;&gt; &gt; Tkx::tk__getOpenFile() to return the file name correctly or how to <br/>&gt; work <br/>&gt; &gt;&gt;&gt; &gt; around the problem? <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; Thanks, <br/>&gt; &gt;&gt;&gt; &gt; Scott <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; ---------------------------------------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; Scott Parrill <br/>&gt; &gt;&gt;&gt; &gt; Information Technology Specialist <br/>&gt; &gt;&gt;&gt; &gt; Enterprise Technology Services / <br/>&gt; &gt;&gt;&gt; &gt; Wyoming State Geological Survey <br/>&gt; &gt;&gt;&gt; &gt; State of Wyoming <br/>&gt; &gt;&gt;&gt; &gt; P.O. Box 1347 <br/>&gt; &gt;&gt;&gt; &gt; Laramie, WY 82073 <br/>&gt; &gt;&gt;&gt; &gt; Phone: 307-766-2286 x242 <br/>&gt; &gt;&gt;&gt; &gt; Fax: 307-766-2605 <br/>&gt; &gt;&gt;&gt; &gt; E-mail: Scott.Parrill@wyo.gov <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; ---------------------------------------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; E-Mail to and from me, in connection with the transaction of public <br/>&gt; &gt;&gt;&gt; &gt; business, is subject to the Wyoming Public Records Act and may be <br/>&gt; &gt;&gt;&gt; &gt; disclosed to third parties. <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; ---------------------------------------------------------------------- <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt;&gt; &gt; E-Mail to and from me, in connection with the transaction <br/>&gt; &gt;&gt;&gt; &gt; of public business, is subject to the Wyoming Public Records <br/>&gt; &gt;&gt;&gt; &gt; Act and may be disclosed to third parties. <br/>&gt; &gt;&gt;&gt; &gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; <br/>&gt; &gt; <br/>&gt; &gt; E-Mail to and from me, in connection with the transaction <br/>&gt; &gt; of public business, is subject to the Wyoming Public Records <br/>&gt; &gt; Act and may be disclosed to third parties. <br/>&gt; &gt; <br/>&gt; <br/> <br/> <br/>E-Mail to and from me, in connection with the transaction <br/>of public business, is subject to the Wyoming Public Records <br/>Act and may be disclosed to third parties. <br/> http://www.nntp.perl.org/group/perl.tcltk/2013/08/msg657.html Thu, 01 Aug 2013 19:29:09 +0000