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

sorry for really long delay,
you gave up, or may be I can help you with Tcl/Tk?
BTW you'll certainly get help on related mailing list, tcltk at perl.org
Have a nice day!
  • Comment on Re^11: Tk:Photo -data with binary data?

Replies are listed 'Best First'.
Re^12: Tk:Photo -data with binary data?
by BrowserUk (Patriarch) on Jun 07, 2007 at 23:43 UTC

    Since I never got around to removing tcl, I grabbed Tcl/Tk v0.97 and attempted to install it. The build went clean, but it fails the tests for the same reason as above: it is looking in all the wrong places for init.tcl. Here is a typical failure message:

    t\after.........Can't find a usable init.tcl in the following director +ies: C:/Perl/site/lib/auto/lib/tcl8.4 C:/Perl/lib/tcl8.4 C:/lib/tcl8.4 C:/Perl/library C:/library C:/tcl8.4.14/library

    And here is a list of places where an init.tcl currently exists on my system:

    C:\>attrib /s init.tcl A C:\erl5.4.4\lib\gs-1.5.4\priv\tcl\lib\tcl8.3\init.tcl A C:\Mozart\platform\win32-i486\wish\tcl\init.tcl A *C:\Perl\site\lib\auto\Tcl\init.tcl A C:\ruby\lib\tcl8.3\init.tcl A C:\Tcl\lib\bwidget1.8\init.tcl A C:\Tcl\lib\tcl8.4\init.tcl A C:\Tcl\vtcl-1.6.0\lib\bwidget\init.tcl

    The one I've asterixed (*) above looks to be where it should be looking? If there is some simple way of pursuading it to look there that I have missed, please enlighten me.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I afraid - you need to remove asterixed file...
      or more precisely, are there more tcl files there? may be you need to remove that Tcl/Tk?

      I am not happy with init.tcl searching algorithm either, and it seems to fall into wrong way in your particular case

      init.tcl is searched relative to tcl84.dll, which is loaded when Tcl.dll loaded, so, you should find right exact Tcl/Tk installation first

      BTW ActivePerl 5.8.8+ comes with Tcl/Tk correctly bundled, there's some magic file tkkit.dll within it.
      This is another approach, but you must be careful to not mix different installations.

      returning to your 1/2 year ago attempt on pure tcl/tk attempt - "Image format png is not supported" - you just need

      package require Img
      or in Tcl::Tk style -
      $int->packageRequire('Img');

      ... and don't hesitate using support list tcltk at perl.org

      Best regards,
      vkon

        I afraid - you need to remove asterixed file...

        I'm sorry, but that makes no sense. Removing that file makes no difference, as that directory is never looked at (as confirmed by the error message I listed above). Remember it is when attempting to run nmake test that these failures are occurring.

        The distrurbing part is that none, not a single one of those paths that are being searched, actually exist on my system. So why are they being searched?

        init.tcl is searched relative to tcl84.dll, which is loaded when Tcl.dll loaded, ...

        That suggests that the file you are suggesting I delete, is indeed the file that should be being looked for:

        Directory of C:\Perl\site\lib\auto\Tcl 2007-06-08 06:33 <DIR> . 2007-06-08 06:33 <DIR> .. 2006-11-30 01:46 199 .packlist 2006-11-26 09:27 1,021,257 base-tcl-thread-win32-ix86.dll 2006-11-26 08:54 876,544 iconv.dll 2006-11-29 18:14 25,820 init.tcl 2006-11-26 08:55 38,912 libexslt.dll 2006-11-26 08:55 618,496 libxml2.dll 2006-11-26 08:55 128,000 libxslt.dll 2006-11-30 01:45 0 Tcl.bs 2006-11-30 01:45 45,056 Tcl.dll 2006-11-30 01:45 719 Tcl.exp 2006-11-30 01:45 1,826 Tcl.lib 2006-11-30 01:45 166,912 Tcl.pdb 2006-11-26 08:28 614,400 tcl84.dll 2006-11-26 08:28 16,384 tclpip84.dll 2006-11-30 01:47 <DIR> Tk 2006-11-26 08:30 811,008 tk84.dll
        ... so, you should find right exact Tcl/Tk installation first.

        I'm sorry, but I don't understand what that means?

        I should point out that all of the tcl demos run perfectly, which suggests that the AS Tcl installation is fine.

        ... and don't hesitate using support list tcltk at perl.org.

        I only re-attempted installation of Tcl/Tk because a) you belatedly responded to my earlier problems; b) I noticed you had released a new version of Tcl/Tk.

        I hoped that the two events were related, that my earlier problems might have been addressed and so I attempt to install v0.97 by way of confirmation to you that your efforts had succeeded. Sorry that is not the case.

        Tcl works on my system. Perl works on my system. It seems to just be the glue between the two that fails, but without that Tcl is taking up disk space as I have no use for it unless I can get to it from Perl.

        You are the author of Tcl/Tk. If you are unable to help me here, I don't see why I would get better help via a mailing list.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        returning to your 1/2 year ago attempt on pure tcl/tk attempt - "Image format png is not supported" - you just need

        package require Img

        #!/usr/bin/wish package require Img set fdata [read [open "/test/colorcube.png"]] label .l1 -image [image create photo -format png -data $fdata] pack .l1

        Results is a popup labelled "Error in startup script" containing the text

        couldn't recognise image data while executing "image create photo -format png -data $fdata" invoked from within "labal,l1 -image [image create photo -format png -data $fdata]" (file c:\Tcl\test\test.tcl" line 4)

        Which looks extremely similar to the problem I was having in OP of this thread. Namely, that it doesn't seem to be possible to pass image data in binary form using the -data option. Even when using Tcl directly.

        It seems unlikely that if I ever get Tcl::Tk to install, that it would allow me to do this either.

        All of which makes this whole Tcl/Tk subthread, and the time expended downloading and installing Tcl, a complete waste of time! Thanks.

        And if that sounds ungrateful, it probably is. You see, I asked my question in the OP because I was trying to solve a particular problem. That problem remains unsolved.

        I understand that as the author of Tcl/Tk, you are keen to promote it, but offering me a 'solution' that can never solve my problem is just a ****** *** ***** waste of my ****** time.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.