Prev: Tcl vs. Lua
Next: Checksum
From: Andry on
Hi Ulrich,
Good point, I've just "appended" the wish contents of auto_path to the
tclsh contents of auto_path.
Now, it seems to find the package but there's something wrong with the
code of the package itself, see below:
-------------------------------------------------
% package require IxTclHal
invalid command name "console"
-------------------------------------------------

For some reasons tclsh does not recognize this command "console"
whereas wish83 does. Another problem of libraries/packages to load? Any
clue?

Thanks

From: Cameron Laird on
In article <1140557108.559468.260860(a)g44g2000cwa.googlegroups.com>,
Andry <yandry77(a)gmail.com> wrote:
>Hi Ulrich,
>Good point, I've just "appended" the wish contents of auto_path to the
>tclsh contents of auto_path.
>Now, it seems to find the package but there's something wrong with the
>code of the package itself, see below:
>-------------------------------------------------
>% package require IxTclHal
>invalid command name "console"
>-------------------------------------------------
>
>For some reasons tclsh does not recognize this command "console"
>whereas wish83 does. Another problem of libraries/packages to load? Any
>clue?
>
>Thanks
>

Ha! We're getting close ... Try this:

# Do as Ulrich suggested.
lappend ::auto_path ...
package require Tk
package require IxTclHal
From: Andry on
No way, I still get the message:
-------------------------------------------------
% package require IxTclHal
invalid command name "console"
-------------------------------------------------
So, all the auto_path directories are included in Tclsh auto_path too,
but it still doesn't work.

From: Neil Madden on
Andry wrote:
> No way, I still get the message:
> -------------------------------------------------
> % package require IxTclHal
> invalid command name "console"
> -------------------------------------------------
> So, all the auto_path directories are included in Tclsh auto_path too,
> but it still doesn't work.

Simple fix: before the package require IxTclHal, just add:

proc console args { puts "DEBUG: console $args" }

The console command is provided by Wish on Windows, but doesn't exist in
most Tcl/Tk environments. With the above you should be able to see
printed to stardard output any messages meant for the console. Most
likely, these are just debugging messages that you can ignore, but you
should check the output anyway, just in case.

-- Neil
From: Don Porter on
Andry wrote:
> No way, I still get the message:
> -------------------------------------------------
> % package require IxTclHal
> invalid command name "console"

The [console] command comes from the wish application, not the Tk package.

If you have code that uses [console], it needs to run in wish84,
not in tclsh84.

If the use of [console] is in a package, please consider feeding
back to the authors of that package that this is not a good idea,
as packages really ought to be able to be [package require]d into
more than one application.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter(a)nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Tcl vs. Lua
Next: Checksum