f



[TCL/TK interface] Passing variable to TCL/TK

Hi,
I am trying to sent to a variable to tcl/tk and unify there it with a
string.

I wrote the prolog code:

:- use_module(library(tcltk)).
:- use_package(classic).


go(A):-
        tk_new([name('Simple')], Tcl),
        tcl_eval(Tcl, 'source simple2.tcl', _),
        tcl_eval(Tcl, ['ask', br(write(A))], _),
        tk_main_loop(Tcl),
        tcl_delete(Tcl).


and the tcl file simple2.tcl

proc ask {var} {

unify_term $var my_value
}

unfortunatelly when I query for

go(S).

the interpeter goes into a loop (!?).
Where I am wrong.
Are there any example code somewhere in the world?
Thanks

Massimo

0
9/8/2005 3:25:47 PM
comp.lang.prolog 3728 articles. 0 followers. Post Follow

0 Replies
1088 Views

Similar Articles

[PageSpeed] 32

Reply: