Problem in opening newLisp script with a double-clic

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
newBert
Posts: 156
Joined: Fri Oct 28, 2005 5:33 pm
Location: France

Problem in opening newLisp script with a double-clic

Post 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

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Post 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!
(λx. x x) (λx. x x)

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post 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.
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post 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

newBert
Posts: 156
Joined: Fri Oct 28, 2005 5:33 pm
Location: France

Post 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 :-(

Locked