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

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

Post by mappop » Sat, 10 Sep 2005 00:25:47


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
 
 
 

1. E.J. Friedman-Hill's Tcl/Tk Course - Tcl/Tk Programming in Five Easy Lessons

2. Tcl/Tk 8.5 Release Calendar (was A Busy Developer's Guide to Tcl/Tk 8.5)


The feature freeze date for Tcl/Tk 8.5 is December 1, 2006. After that,
we don't plan to add more features. Once feature additions are frozen,
a beta release will be produced, so expect to see Tcl/Tk 8.5b1 in early
December.

Then we begin the period of beta testing, stabilization, performance
improvements, and last minute corrections to any misfeatures. This will
likely involve at least one more beta release, and as many more as are
required to reach a reasonable quality for 8.5.0.

Assuming all goes well, it's a good guess that Tcl/Tk 8.5.0 can get
released by March 1, 2007. That is only a guess, and not a promise.
The release will happen when it is ready.

--
| Don Porter Mathematical and Computational Sciences Division |
| XXXX@XXXXX.COM Information Technology Laboratory |
| http://www.yqcomputer.com/ ~DPorter/ NIST |
|______________________________________________________________________|

3. E.J. Friedman-Hill's Tcl/Tk Course - Tcl/Tk Programming in Five Easy Lessons

4. Using Tcl::Tk Module with Tcl/Tk 8.5

5. Tcl/Tk tutorials [Was: Want Recommended Tcl/Tk Scripts

6. perl tk equivilent to Tcl/Tk fitToContents

7. Tcl/Tk to Perl/TK Translation Problem

8. Tk make test fails completely in Linux/KDE (was: Tcl/Tk 8.5.0 Release Candidates)

9. tk::mac::ShowPreferences in Tcl/Tk Linux version?

10. Revitalizing Tk (was Using the C Source Code from Tcl/Tk)

11. Embed the Tk Console in a Tcl/Tk application

12. Tk make test fails completely in Linux/KDE (was: Tcl/Tk 8.5.0 Release Candidates)

13. Tk send command on Tcl/Tk Aqua Batteries Included

14. Tcl and the Tk Toolkit--no coverage of Tk's C API

15. Perl::Tk vs Tcl::Tk vs Tkx vs ...?