Hello:
After running into major compatitiblity problems with C#, ASP.NET, MS Access, Linux, and Mono, I've decided to program in a language that is cross-platform, open source, and compatible with embedded databases that are also compatible with many platforms. I narrowed my choice down to TCL.
Before I began a sample application with...
Hello:
I am trying to figure out the basic steps to creating a Tcl starkit in Windows. I've asked a similar question before, as well as purchased a book on Tcl programming, visited wiki.tcl.tk, emailed Tcl programmers directly, etc... In all, I've received great feed back from my resources and this website; however, I've failed to exp...
Hi,
After trying many and searching web option to compile and load dll I could not able to create dll for tcl. Can you explain me how to do this.
...
I have a c++ server side project that I need to embed some sort of scripting into. It is part of an online MMO type of server. I have significant experience using TCL, and it seems like the natural fit. I've done a minimal amount of Lua in my game dev days, and I wonder if this might be a better language for embedded scripting. It is als...
Is there any command line tool for Linux (FreeBSD, etc) which can modify like Resource Hacker versioninfo in exe file?
There are some utils for that purpose under Windows, but I'm doing cross-building of Windows Tcl Starpacks on FreeBSD.
Of cource it is possible to recompile TclKit with my versioninfo and icons but I don't want to do i...
I'm trying to run tclhttpd in a slave interpreter but slightly modified so as to run within a tclkit. The code below "runs" (I can hit http://localhost:8015) but never reaches the puts line at the bottom because "the server does not return, it enters [vwait forever]". But when I try "the after 0 trick", e.g. prepending "after 0 " to th...
package require Expect
#### Log File Name #####
set logFile "mtte_result.log"
set NextLine "\n"
set RTSPrompt "RTS_Mon-> "
exp_spawn plink.exe -telnet -P 10009 10.245.97.42
set spid $spawn_id
#exp_send $NextLine
flush stdout
##### Log the session to the File #########
exp_log_file -noappend $logFile
exp_sleep 5
exp_send $NextLi...
The BWidget ComboBox widget allows you to fill in an entry field with a value. I would like to enforce only specific characters in that field (e.g. only [a-z0-9]). For that purpose I would like to use Tcl/Tk's -validatecommand (or -vcmd for short), just as you do with the standard 'entry' widget:
proc ValidateMyEntry { value } {
# C...
Hello:
I am building a Tcl application that reads off of a Sqlite Db. Currently, I can enter data into the database using the Tcl frontend. Now, I am trying to figure out how to display the data within the Sqlite Db from the Tcl frontend.
After a little bit of research, I found that the treeview widget would work well for my needs. ...
I can easily concatenate two variables, foo and bar, as follows in Tcl: "${foo}${bar}".
However, if I don't want to put an intermediate result into a variable, how can I easily concatenate the results of calling some proc?
Long hand this would be written:
set foo [myFoo $arg]
set bar [myBar $arg]
set result "${foo}${bar}"
Is there s...
The ingame script will control NPC/AI logic.
If I were to implement ingame scripting feature which language should it support?
JavaScript (builtin browser support)
TCL (interpreter in java)
Lua (popular)
Squirrel
CSI
Other
Keep in mind my implementation will run on multiple platforms like .net, flash, javascript and java.
What...
There must be an easy way to do this, but I can't find it.
What command can I run within Tcl to get it to introspect and report the version of itself that is running?
...
I would like to get all elements following a particular index of a list. This could be written as:
set foo {0 1 2 3 4 5 6 <...> n}
puts [lrange $foo 1 [llength $foo]]
However, it seems like a waste to compute the length of the list. It would be nice if the last argument to lrange was optional and omitting it meant to continue until ...
Hello:
I am trying to build a Tcl Application that reads off of a Sqlite database. When I build a starkit for the application and place the Sqlite database file next to the .tcl file within the .vfs folder and try to run the application (.exe), I receive the error, "can't find package sqlite3 while executing package require sqlite3".
...
Hello:
I am using the following procedure to delete a record within a database that is displayed within a treeview widget (z1):
set z1 [ttk::treeview .c1.t1 -columns {first last} -show headings]
proc Dlt {} {
global z1 z11
sqlite3 db test.db
db eval {
DELETE From t1 Where First_Name = $z11 and Last_Name = $z11
...
I have tried to do this refering to follwoing link.
http://skypher.com/index.php/2008/07/28/function-list-for-php/
But no success.
Can you help me please.
It will be great if namesapces also parsed.
...
Hi,
In Tcl 8.5 I can do something like this:
apply llength { 1 2 3 }
But that apply is not defined in v8.4.
How would I define apply using Tcl in v8.4?
I need this because I am converting some lisp code to Tcl. The lisp code has some constructs that I would like to port like this:
array set levels {
TRACE 0
DEBUG 1
INFO ...
I would like to have a comment within a command and it appears that this is not possible given that the '#' character is defined in Tcl 8.4 to be:
If a hash character (``#'') appears at a point where Tcl is expecting the first character of the first word of a command, then the hash character and the characters that follow it, up through...
If I have a proc that needs to return an array to its caller, what is the best way to do this?
I following code does not work in Tcl due to inability to $ an array variable:
proc mine {} {
array set foo { red 1 blue 2 green 3 }
$foo
}
tcl> set foo [mine]
Error: can't read "foo": variable is array
Alternatively this doesn't work ...
Hi all,
I've got a Tcl/Expect program that reads and writes data to the serial port.
I did all of my development and testing on a Fedora 7 machine, but I'm now trying to run the same code in Ubuntu 8.10, and I'm getting the following error:
spawn: returns {0}
bad option "-mode": should be one of -blocking, -buffering, -buffersize, -enc...