Page 1 of 1

newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 1:42 pm
by kukma
newLISP v.10.1.8 on Win32 IPv4, ...

Hello,

I executed (gs:new) in the newLISP-gs. The GUI seemed frozen.
In the task manager I saw that a new instance was created. So I killed both processes.
Now the GUI does not appear.
'Java Web Start' still works with another application.
A Windows restart did not help.
What went wrong and how can I repair that?

Re: newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 5:25 pm
by cormullion
Hi! I'm not sure what (gs:new) is supposed to do?

Re: newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 5:57 pm
by kukma
newLISP-GS and GTK-server worked for some examples already.
Then in a new program I intended to clear the text in the output window so that it did not become part of a output file.

I also need to switch on/off the output in that window while the program runs.

Re: newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 7:22 pm
by cormullion
Ah, OK. I don't think there is a (gs:new) function. At least, there isn't on my system:

ERR: invalid function : (gs:new)

There's a Clear Monitor command - for clearing the output/monitor area...

You can use device to divert output:

Code: Select all

(println "hi there" )
(device (open "/dev/null" "write"))
(for (x 1 100)
     (print  x { }))
(device 0)
(for (x 1 100)
     (print x { }))
Although silent is probably better:

Code: Select all

(silent 
  (for (x 1 100)
     (print  x { })))


(I hope Lutz gets back soon - I'm struggling here...:)

Re: newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 9:01 pm
by kukma
cormullion wrote: There's a Clear Monitor command - for clearing the output/monitor area...
Ok. This will become clear.
cormullion wrote: You can use device to divert output:

Code: Select all

(println "hi there" )
(device (open "/dev/null" "write"))
(for (x 1 100)
     (print  x { }))
(device 0)
(for (x 1 100)
     (print x { }))
results in an error:

hi there
"hi there"

ERR: value expected : (open "/dev/null" "write")
>
cormullion wrote: Although silent is probably better:

Code: Select all

(silent 
  (for (x 1 100)
     (print  x { })))

this gives back all 100 numbers.
That's not what I expected.

As a beginner I simply copy and pasted.

Re: newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 9:25 pm
by TedWalther
That doesn't work, because Windows doesn't have /dev/null. I'm not sure what the equivalent is for Windows.

Re: newLISP-gs opens only splash picture

Posted: Mon Jan 04, 2010 9:57 pm
by cormullion
Sorry - bad examples! silent suppresses console output, so:

Code: Select all

(silent (set 'x (sequence 0 100)))
doesn't report what it's done. That's what I meant to mention...

If you want to divert output , just use any temp file, it doesn't have to be /dev/null:

Code: Select all

(device (open "myfile" "write")) 

Re: newLISP-gs opens only splash picture

Posted: Tue Jan 05, 2010 12:52 am
by Sammo
For windows

Code: Select all

(device (open "nul" "write"))

Re: newLISP-gs opens only splash picture

Posted: Tue Jan 05, 2010 9:13 am
by Lutz
When running programs from newLISP-GS, all return values from evaluated top-level expressions are shown in the console. This is useful when developing programs.

But you can run the same programs from a Windows commandshell without the newLISP-GS IDE:

Code: Select all

C:\Users\Besitzer>newlisp "\Program Files (x86)"\newlisp\guiserver\button-demo.lsp
Note, that forward slashes work as well inside a newLISP program as in the Windows command shell:

Code: Select all

C:\Users\Besitzer>newlisp "/Program Files (x86)"/newlisp/guiserver/button-demo.lsp
Now, no output is shown, except when using 'print' statements explicitly in the code.

The above was run on a German Windows-7 installation, but will work on Windows XP too.


Ps: I am still travelling and on European time, but will be back in the US and on Eastern time on Friday.

Re: newLISP-gs opens only splash picture

Posted: Fri Jan 08, 2010 10:58 pm
by kukma
Thank you Lutz and welcome home again, the principle has become clear. Also a thank you to all others. Hope you all had a good Christmas too.

For now the GTK didn't work again on one machine. So if you, Lutz, have a hint for me....
Luckily I still can call GTK on another Windows XP.
Additionally Crimson Editor does a good job for now and I also will take a look on some other text editors.
I will be back with new questions if here are any.