in reply to Re^3: Tk:Photo -data with binary data?
in thread Tk:Photo -data with binary data?

Thanks, but I been here before. I just downloaded Tcl::Tk and tried to build it

c:\Perl\packages\Tcl-Tk-0.92>makefile 'tclsh' is not recognized as an internal or external command, operable program or batch file. Your Tcl installation (tclsh) fails to find Tk package. One of possible reasons is missing file 'pkgIndex.tcl' in ..../tk8.4/ directory; Please check if you can feed 'package require Tk' to tclsh

At that point, I read the cpan docs and there is no mention of any dependancies, never mind where i might obtain them.

So I look into the readme and it says

Normally you just make sure you have right tcl/tk in your path at a moment of running Makefile.PL script.

But again, there is no mention of what 'tcl/tk' is, never mind where I would have to go to get it, or what pain is going to be involved in trying to build it for win32.

I just want to be able to throw a couple of images onto my screen and 'flicker compare' them. I'm trying to analyse some large chunks binary data, and this is a technique I've used before with great success.

My point is, I've no interest in building fancy guis, nor do I wish for the distractions of trying to get yet another 'never intended for windowz' package to build on my system.

That's why I tried Tk--it's already installed. It's also why I'll look into win32::GUI. I did once get GTK2 built on my system, but the first time I upgraded Perl, it broke and the memory of all the pain involved in tracking down the huge list of dependancies and working out how to build them puts me off from trying again.

This is why I tend to use binary distributions wher they are available most of the time. It's not that I cannot work out how to do these things. It's that I am in the middle of something and don't want to be distracted from it spending days and weeks trying to resolve these kinds of problems. Especially when it involves learning yet another set of apis and bindings, and it'll all fall in a heap and have to be repeated then next time I unpgrade Perl.

Please don't misunderstand me. I've seen several positive references to tcl/tk on PM over the last couple of years, and I'm sure that it's a brilliant package. One day Real Soon Now I'll set aside time for working out what it it, where it is, and what else I need to make it build and run, but right now I just want to be able to flicker compare a couple of images I produce with GD. A quick scout of what's available for Win32::GUI tells me that isn't going to be trivial either, so I'll probably settle for the easy option of outputting the images to files and using a image viewer to flick between them.

Unfortunately, this is pretty indicative of the whole Perl/CPAN experience. Individually, modules tend to do what they do pretty well. The problems arise when you try to use two or more together in a single app. The disconnect between them--Tk and GD in this case--means that you end up having to perform twice as much work as should be necessary in converting data from one format to another.

I know Perl is defined as a 'glue language', and is great at it, but the lack of a 'joined up architecture' means that you end up using great gobs of glue where a couple of screws would be so much better. I do hope this lesson is learnt when (if?) Perl6 (sorry, read that as "Perl 6"), and CP6AN start to come together.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^5: Tk:Photo -data with binary data?
by vkon (Curate) on Nov 29, 2006 at 14:01 UTC
    okay, if a man with your level of knowledge gets confused, this means the installation instruction needs fixing...

    But if you're afraid of windows binaries, then just install ActiveTcl, and continue where you stopped last time...

    Also, recent ActivePerl comes with Tcl/Tk bundled into single dll, so dependant Tcl module from CPAN already shipped with binary...
    And finding tcl/tk on the PATH means existance of tclsh.exe somewhere in PATH

    PS. I also had problem with Gtk on Windows, although they are solvable, I am not ready for it -- too huge for deployment, and, beleive me or not, its look-n-feel worse than look=n-feel of Tcl/Tk+tile

      Okay. I pulled ActiveTcl and installed without problems. Making Tcl/Tk went further, but:

      c:\Perl\packages\Tcl-Tk-0.92>makefile Checking if your kit is complete... Looks good Warning: prerequisite Tcl 0.85 not found. Writing Makefile for Tcl::Tk c:\Perl\packages\Tcl-Tk-0.92>nmake Microsoft (R) Program Maintenance Utility Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. cp lib/Tcl/Tk.pm blib\lib\Tcl\Tk.pm cp lib/Tcl/Tk/Widget/Balloon.pm blib\lib\Tcl\Tk\Widget\Balloon.pm c:\Perl\packages\Tcl-Tk-0.92>nmake test Microsoft (R) Program Maintenance Utility Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_ t\after.........Can't locate Tcl.pm in @INC (@INC contains: C:\Per BEGIN failed--compilation aborted at C:\Perl\packages\Tcl-Tk-0.92\ Compilation failed in require at t\after.t line 4. BEGIN failed--compilation aborted at t\after.t line 4. t\after.........dubious Test returned status 2 (wstat 512, 0x200) [clipped lots more failling tests]

      what is " Tcl 0.85"? Is this another perl package? Or should it be satisfied by the ActiveTcl iinstallation meaning I've got a path/env problem?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Tcl::Tk requires Tcl CPAN module, which in turn wants Tcl/Tk installation, because Tcl is the thin bridge module between Perl and Tcl.

        BTW another CPAN module which provides Tcl/Tk GUI is Tkx, it also connects to Tcl/Tk via Tcl. It is extremely thin and do not provide perl/Tk syntax.

        BTW this approach has its mailing list tcltk@perl.org , so you'll get all answers there.

        Best regards,
        Vadim

Re^5: Tk:Photo -data with binary data?
by vkon (Curate) on Nov 29, 2006 at 14:32 UTC
    one more thing... Tcl::Tk is pure Perl (unlike Tcl CPAN module), so you can just copy one single file Tk.pm into ./site/lib/Tcl/ dir...
    I'll fix this installation problem at next time...