Problem in opening newLisp script with a double-clic

Started by newBert, April 19, 2006, 05:53:00 AM

Previous topic - Next topic

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
<r><I>>Bertrand<e></e></I> − <COLOR color=\"#808080\">><B>newLISP<e></e></B> v.10.7.6 64-bit <B>>on Linux<e></e></B> (<I>>Linux Mint 20.1<e></e></I>)<e></e></COLOR></r>

rickyboy

#1
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


"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

#2
It happens in the newLISP-tk.tcl



foreach arg $argv {
NewlispEvaluate "(silent (load "$arg"))"
}


Seems that TCL modify the arg somehow.


Quote
newLISP v.8.8.5 on Win32 MinGW.



>

problem accessing file in function load : "C:ProgrammenewlispDemo.lsp"



> (tk-args)

("{C:\Programme\newlisp\Demo.lsp}")

>


(tk-args) returns the correct file with path.
Hans-Peter

Lutz

#3
You could create a batch file Demo.bat containing:



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

#4
Well, you can also use my 'run.exe' for that.



http://www.turtle.dds.nl/run/index.html">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

#5
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.



<r><I>>Bertrand<e></e></I> − <COLOR color=\"#808080\">><B>newLISP<e></e></B> v.10.7.6 64-bit <B>>on Linux<e></e></B> (<I>>Linux Mint 20.1<e></e></I>)<e></e></COLOR></r>