Page 1 of 1

Problem in opening newLisp script with a double-clic

Posted: Wed Apr 19, 2006 12:53 pm
by newBert
Why can I not launch (with newLisp-tk) a newlisp script by a single double-clic on the file icon ?
When I try this, the result is an error message such as : "problem accessing file in function load"

e.g.:
I put a copy of the file "Demo.lsp" in a directory C:\newlisp and I get the following message : problem accessing file in function load : "C:\newlispDemo.lsp".
(same effect with another or the original directory).

However, if the directory is the root (i.e.: C:\Demo.lsp) I can open the file with a double-clic on it.

NB : if I try to open a script with newlisp.exe (without -tk) in this way, there is no problem.

[newLISP v.8.8.5 on WinXP-SP1 Home Edition]

thank you in advance for your help

Posted: Wed Apr 19, 2006 1:19 pm
by rickyboy
I don't know, definitively, the answer to your question; however, I did notice a curious thing. The error message echoed the filename back as

Code: Select all

"C:\newlispDemo.lsp"
and a backslash (really, pathname separator) is conspicuously missing. I don't know if this is a valid clue, but perhaps some newLISP veteran can tell us. Good luck!

Posted: Wed Apr 19, 2006 2:09 pm
by HPW
It happens in the newLISP-tk.tcl

Code: Select all

foreach arg $argv {
	NewlispEvaluate "(silent (load \"$arg\"))"
	}
Seems that TCL modify the arg somehow.
newLISP v.8.8.5 on Win32 MinGW.

>
problem accessing file in function load : "C:Programme\newlispDemo.lsp"

> (tk-args)
("{C:\\Programme\\newlisp\\Demo.lsp}")
>
(tk-args) returns the correct file with path.

Posted: Wed Apr 19, 2006 3:08 pm
by Lutz
You could create a batch file Demo.bat containing:

Code: Select all

newlisp-tk Demo.lsp
you can double click on that and it works, but I would not know how tu suppress the cmd.exe window, which also pops up.

Lutz

Posted: Thu Apr 20, 2006 9:34 am
by pjot
Well, you can also use my 'run.exe' for that.

http://www.turtle.dds.nl/run/index.html


Just enter the line 'newlisp-tk prog.lsp' in the ini file and start 'run.exe'. No DOS box whatsoever.

Peter

Posted: Thu Apr 20, 2006 1:49 pm
by newBert
I thank you for your quick and interesting replies.

I think I'll try "run.exe". I heard of it in, if I've a good memory, the GTK-Server web site.

I would like to point something else out :
when I launch a newlisp-tk script from some text editors, like ConTEXT, Crimson Editor or SciTE, for instance, everything is fine !...

Therefore it may be that the problem comes from Windows file management rather than Tcl ? (lack of flexibility in the file and folder options?)

Thanks again.
I'd like to find a french-speaking forum about newLISP, like this one :-)
because I'm not very skillful with english language :-(