Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Update 2019-02-26: disregard my hypothesis below; I've since figured out what the issue was and addressed it in Tcl::pTk 0.95. See my newer reply.

Howdy, I was recently added as a co-maintainer of Tcl::pTk, so I wish I had come across this question earlier.

Indeed this sounds like part of the program is trying to use Tk but Tcl::pTk::TkHijack isn't loaded. Having Tcl::pTk installed does not make Perl/Tk programs automatically use it. To summarize what's documented, using Tcl::pTk with an existing program requires (from most to least effort) either:

  1. substituting all mentions of Tk with Tcl::pTk, i.e. use Tk; with use Tcl::pTk;, any Tk::package or Tk->thing with Tcl::pTk::package or Tcl::pTk->thing, etc.;
  2. putting use Tcl::pTk::TkHijack; (BEFORE any existing use Tk;) at the top of the program's main script;
  3. running the program's script using the -MTcl::pTk::TkHijack command-line parameter, i.e. perl -MTcl::pTk::TkHijack my_tk_program.pl.

I find the command line parameter approach the easiest for testing an entire program without changing any code; that way I can still run it with Perl/Tk for comparison or when something breaks under Tcl::pTk. The use Tcl::pTk::TkHijack; approach has the same effect, and just that line will need to be commented out to go back to Perl/Tk. Then, for programs "ready" to be run only with Tcl::pTk (i.e. Tcl::pTk doesn't break for your program) and you don't want to use Perl/Tk anymore, then the first approach might work better.

PS: I put out a new version of Tcl::pTk recently (0.93), though there isn't any changes that would affect this findINC issue. I also added Tcl::pTk to MacPorts, which uses Tcl/Tk 8.6.8. Note that macOS comes with an older version of Tcl/Tk (8.5.9 in macOS 10.13); some improvements for macOS aqua have since been added in e.g. 8.6.8.


In reply to Re^4: Tcl::pTk Can't locate object method "findINC" via package "Tk" by chrstphrchvz
in thread Tcl::pTk Can't locate object method "findINC" via package "Tk" by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (1)
As of 2024-04-25 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found