Prev: Tcl vs. Lua
Next: Checksum
From: Cameron Laird on
In article <slrndvngc3.r94.dgp(a)clover.cam.nist.gov>,
Don Porter <dgp(a)nist.gov> wrote:
>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.
.
.
.
Agreed. I apologize; I gave Mr. Rossi advice about [console]
that was simply mistaken, and a distraction from any real pro-
gress.

While waiting on a reply from the application author, it should
be entirely safe to insert a definition

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

or similar somewhere before the

package require IxTclHal

To do so might help you achieve your goals quicker.
From: Andry on
Thanks a lot, for all the information.
Anyway I still face a couple of problems:
1) if I update the auto_path for wish84 and then I type the command
"package require IxTclHal" I get a fatal error. So, wish84 seems not to
support IxTclHal (but wish83 does).
2) under tclsh84, I tried the workaround you described about the
"console" command and I get a fatal error again (like in wish84) and
Tclsh gets completely freezed after showing the following:
---------------------------------------
% source test-tclsh-ix.tcl
CONSOLE: show
---------------------------------------
"test-tclsh-ix.tcl" sources the "console" procedure, requires IxTclHal
package and run the rest of my script.

And this is the message in the fatal error window:
------------------------------------------------------------------------
ixTclHal encountered a fatal error and will close.
The crash info has been saved to
C:\Tcl\bin\ixTclHal-3_80_125_27-CrashLog-20060222-091619.dmp
------------------------------------------------------------------------

If you are interested I can send the DMP file. I opened that with
Wordpad and it contains a bunch of unreadable characters plus some
pieces of the code and also the screen output I was expecting from the
Tclsh stdout.

I suppose there is a problem with wish84 and the packages created by
Ixia. Indeed, my Ixia software has been recently updated but it still
includes "wish83" (not wish84). Maybe this is not a coincidence.

What do you think?
I'll also try to get in touch with Ixia Support to get some feedback
about wish support on Ixia software (IxScriptMate).
Btw, I guess this is the piece of code that calls "console" in a
package called IxTclSetup which is in turn required by IxTclHal:
----------------------------------------------------------------------------
if {[isWindows] && [info commands tk] != ""} {
if {![regexp -nocase scriptmate [tk appname]]} {
console show
}
}
----------------------------------------------------------------------------

Thanks

From: Andry on
Sorry,
I forgot to post the procedure I used:

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

Thanks,
Andrea

From: Ulrich Schöbel on
Hi Andry,

I made a similar experience a while ago when I tried to
port a too old version of Scotty to a SUN with Tcl8.4.
It came out it used a couple of calls to old private
functions no longer existant in Tcl8.4. Luckily I had
the sources at hand and could change the calls to calls
of official functions. I'm afraid you don't have the sources,
so you're out of luck. There are only two ways out:
Either fall back to Tcl8.3 or let Ixia modernize their
software (or change their calls to private functions).

The call of private functions (they have a 'p' in their
names) was always deprecated. It's sometimes just
comfortable to use them, but it's definitely bad style.
On the other hand it glues the customers to their
support. And, after all, Tcl is a glue language, isn't it?

Kind regards

Ulrich


Am Wed, 22 Feb 2006 09:54:18 -0800 schrieb Andry:

> Thanks a lot, for all the information.
> Anyway I still face a couple of problems:
> 1) if I update the auto_path for wish84 and then I type the command
> "package require IxTclHal" I get a fatal error. So, wish84 seems not to
> support IxTclHal (but wish83 does).
> 2) under tclsh84, I tried the workaround you described about the
> "console" command and I get a fatal error again (like in wish84) and
> Tclsh gets completely freezed after showing the following:
> ---------------------------------------
> % source test-tclsh-ix.tcl
> CONSOLE: show
> ---------------------------------------
> "test-tclsh-ix.tcl" sources the "console" procedure, requires IxTclHal
> package and run the rest of my script.
>
> And this is the message in the fatal error window:
> ------------------------------------------------------------------------
> ixTclHal encountered a fatal error and will close.
> The crash info has been saved to
> C:\Tcl\bin\ixTclHal-3_80_125_27-CrashLog-20060222-091619.dmp
> ------------------------------------------------------------------------
>
> If you are interested I can send the DMP file. I opened that with
> Wordpad and it contains a bunch of unreadable characters plus some
> pieces of the code and also the screen output I was expecting from the
> Tclsh stdout.
>
> I suppose there is a problem with wish84 and the packages created by
> Ixia. Indeed, my Ixia software has been recently updated but it still
> includes "wish83" (not wish84). Maybe this is not a coincidence.
>
> What do you think?
> I'll also try to get in touch with Ixia Support to get some feedback
> about wish support on Ixia software (IxScriptMate).
> Btw, I guess this is the piece of code that calls "console" in a
> package called IxTclSetup which is in turn required by IxTclHal:
> ----------------------------------------------------------------------------
> if {[isWindows] && [info commands tk] != ""} {
> if {![regexp -nocase scriptmate [tk appname]]} {
> console show
> }
> }
> ----------------------------------------------------------------------------
>
> Thanks

From: Andry on
Hi Ulrich,
Thanks for your explanation.
I could try getting the source, identifying the calls and making the
changes I need, but I'd like my tool to run not only on "private"
versions of Tcl.
I'll certainly get in touch with Ixia support, but in the meanwhile I'd
like to try tcl8.3. But I wasn't able to find it on the Internet. The
only available version for Windows that I found is Tcl8.4.
Ixia software just includes wish83 but not tcl83. The reason why I need
to use tcl instead of wish is that my tool starts with getting string
parameters for user input using STDIN which doesn't work on wish.

Thanks,
Andrea

First  |  Prev  | 
Pages: 1 2 3 4
Prev: Tcl vs. Lua
Next: Checksum