Re: Tk Script It problem





On Jan 27, 2:12 pm, Ian Bell <ruffreco...@xxxxxxxxxxx> wrote:
I am using Tk Script It as a simple IDE - it does what I want; syntax
highlighting and script launch.

All is fine if I run it from its own directory. However, when it launches
your script it sources a console script in the same directory. This works
fine if Script It itself is launched from that directory but otherwise (e.g
if I launch it from desktop icon) a 'no such file or directory' error
occurs. It works if I hard code the full path but that is not portable. I
tried prepending $::argv0 but that gives me a 'can't read ::argv0: no such
variable' error which somewhat surprised me. The proc that launches your
script is:

proc test_this { } {
global platform
set bool [interp exists test_bed]
if {$bool == 1} {
interp delete test_bed
}
interp create test_bed
test_bed alias exit interp delete test_bed
load {} Tk test_bed
set filename temp.tcl
set fd [open $filename w]
set data [.text.t get 1.0 end]
puts -nonewline $fd $data
close $fd
test_bed eval {
source crosscon.tcl
source temp.tcl
}
file delete temp.tcl

}Any help appreciated.

Ian ,

I have a fix for this ... somewhere ... honest ;)

It may take me a day or two to find it.

I apologize for the delay, but it has been several years
since the project was in active development.

Steve

.



Relevant Pages

  • Re: Processing workload distribution
    ... The Perl we're using is the 64 bit build of 5.8.8 from Activestate. ... I created a script that uses threads to launch a series of standalone ...
    (comp.lang.perl.misc)
  • Tk Script It problem
    ... I am using Tk Script It as a simple IDE - it does what I want; ... highlighting and script launch. ... set bool [interp exists test_bed] ... set data ...
    (comp.lang.tcl)
  • Single Instance / Multithreading question
    ... I have a single instance, Windows Form application, that takes some ... A solution I found is to launch the file processing in a separate ... so that the next instance can add their files to the queue at ... If I was using a "thread.join" in the script that launches the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: [opensuse] Running a program as root from desktop panel
    ... This is obviously to launch a program from my panel as I mentioned and ... I'm obviously not root so there is no need to make a script which is ... doesn't require gnome or kde and it solves my problem. ...
    (SuSE)
  • Re: Tk Script It problem
    ... highlighting and script launch. ... your script it sources a console script in the same directory. ... set bool [interp exists test_bed] ... interpreter simply with console eval but I have not tried that yet. ...
    (comp.lang.tcl)