Hi.

Von: Manfred Bergmann <[EMAIL PROTECTED]>
Datum: 16. Mai 2006 10:35:02 MESZ
An: OSX Group Perl <macosx@perl.org>
Betreff: Re: Tk Aqua with Perl


Am 16.05.2006 um 08:26 schrieb Jan Dubois:

On Mon, 15 May 2006, David H. Adler wrote:
On Mon, May 15, 2006 at 03:37:08PM -0700, Jan Dubois wrote:
You should be able to do this with the Tcl::Tk module:

    http://search.cpan.org/~vkon/Tcl-Tk/

The Tkx module provides a nice interface on top of Tcl::Tk:

    http://search.cpan.org/~gaas/Tkx/

I have not tried this on OS X though, so it is possible that the
modules don't work out of the box there.

I haven't checked lately, but it used to be that Perl/Tk wouldn't
compile on OS X unless you configured your perl a certain way. This
may have changed since I last looked, but be sure to look over the
docs if you hit any problems, as that might be it.

Tcl::Tk and Tkx don't use the Perl/Tk module; they call the Tcl/Tk code
directly. That way you get access to the latest widgets supported by
Tcl/Tk. Of course you need a working Tcl installation in addition to
just Perl. We use this at ActiveState to create natively themed cross
platform Perl applications for Windows, Linux, Solaris and HP-UX.

I have heard from other people at ActiveState that they got this to work
on OS X too, but I don't remember if they had to do anything special.


I tried Tkx which needs the Tcl module and this module needs to init tcl and I get an error that the file init.tcl is missing on my standard Tiger installation.

I know, this a bit offtopic but does anyone know how I can expand the TCL include path?
The file init.tcl is here:
/System/Library/Frameworks/Tcl.framework/Versions/8.4/Resources/ Scripts/init.tcl

Well, I could symlink the file to where tclinit looks for...

-----------------------
Failed to initialize Tcl with Tcl_Init:
Can't find a usable init.tcl in the following directories:
@TCL_IN_FRAMEWORK@ /usr/lib/tcl8.4 /lib/tcl8.4 /usr/library / library /tcl8.4.7/library @TCL_IN_FRAMEWORK@



This probably means that Tcl wasn't installed properly.

    while executing
"error $msg"
    (procedure "tclInit" line 42)
    invoked from within
"tclInit" at /System/Library/Perl/5.8.6/darwin-thread-multi-2level/ DynaLoader.pm line 253. Unable to initialize Tcl at /System/Library/Perl/5.8.6/darwin- thread-multi-2level/DynaLoader.pm line 253.
Compilation failed in require at /Library/Perl/5.8.6/Tkx.pm line 206.
-----------------------

I finally got Tkx working.

The Perl Tcl error can be fixed by setting the env var:
TCL_LIBRARY=/System/Library/Frameworks/Tcl.framework/Versions/Current/ Resources/Scripts


Best regards,
Manfred

Reply via email to