From: Matthias Meier on
Hello

with the following code

-------------------------------------------------
static Tcl_Interp* x_interp = (Tcl_Interp*)0;
x_interp = Tcl_CreateInterp();
rc = Tcl_Eval( x_interp, "parray" );
-------------------------------------------------

i get the error:
invalid command name "parray"


How do i get 'parray' working? Do i have to call Tcl_Init( x_interp )?
Anything else?

Thanks for all help!

Matthias


From: Robert Heller on
At Wed, 21 Jul 2010 15:01:39 +0200 Matthias Meier <Meier(a)FuH-E.de> wrote:

>
> Hello
>
> with the following code
>
> -------------------------------------------------
> static Tcl_Interp* x_interp = (Tcl_Interp*)0;
> x_interp = Tcl_CreateInterp();
> rc = Tcl_Eval( x_interp, "parray" );
> -------------------------------------------------
>
> i get the error:
> invalid command name "parray"
>
>
> How do i get 'parray' working? Do i have to call Tcl_Init( x_interp )?

Most likely. This loads init.tcl and that probably also loads tclIndex,
which in turn will cause parray.tcl to be loaded when parray is
referenced.

parray is coded in Tcl, not C, and thus does not exist in a 'bare'
Interp -- this means you need to load the base Tcl coded infrastructure.

> Anything else?
>
> Thanks for all help!
>
> Matthias
>
>
>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/

From: Donald G Porter on
Matthias Meier wrote:
> How do i get 'parray' working? Do i have to call Tcl_Init( x_interp )?

Yes.