newLISP-gs opens only splash picture

Q&A's, tips, howto's
Locked
kukma
Posts: 9
Joined: Mon Jan 04, 2010 12:44 pm
Location: 9° E

newLISP-gs opens only splash picture

Post 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?

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: newLISP-gs opens only splash picture

Post by cormullion »

Hi! I'm not sure what (gs:new) is supposed to do?

kukma
Posts: 9
Joined: Mon Jan 04, 2010 12:44 pm
Location: 9° E

Re: newLISP-gs opens only splash picture

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

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: newLISP-gs opens only splash picture

Post 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...:)

kukma
Posts: 9
Joined: Mon Jan 04, 2010 12:44 pm
Location: 9° E

Re: newLISP-gs opens only splash picture

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

TedWalther
Posts: 608
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Re: newLISP-gs opens only splash picture

Post by TedWalther »

That doesn't work, because Windows doesn't have /dev/null. I'm not sure what the equivalent is for Windows.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence. Nine months later, they left with a baby named newLISP. The women of the ivory towers wept and wailed. "Abomination!" they cried.

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: newLISP-gs opens only splash picture

Post 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")) 

Sammo
Posts: 180
Joined: Sat Dec 06, 2003 6:11 pm
Location: Loveland, Colorado USA

Re: newLISP-gs opens only splash picture

Post by Sammo »

For windows

Code: Select all

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

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

Re: newLISP-gs opens only splash picture

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

kukma
Posts: 9
Joined: Mon Jan 04, 2010 12:44 pm
Location: 9° E

Re: newLISP-gs opens only splash picture

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

Locked