* new functions for getting system properties for version, screen and installed fonts
* two new demos: allfonts-demo.lsp and properties-demo.lsp
* increased size for data transfer between serrver and application
* gs:no-event void action-handlers in widgtets
Files: http://newlisp.org/downloads/development/
Changes notes: http://newlisp.org/downloads/development/CHANGES-guiserver-092.txt
Docs: http://newlisp.org/downloads/development/guiserver-0.92/
Lutz
FWIW, allfonts-demo.lst, properties-demo.lst, and newdep's '[gag] new lisp' posted here today:
Quote
invalid function : (gs:get-screen)
Using guiserver-0.92, newLISP v.9.1.1, under XP.
Maybe I missed a readme?
Quote
Maybe I missed a readme?
probably ;-), with every new version of GUI-server you have to copy guiserver.lsp and guiserver.jar into /usr/share/newlisp (on MacOX X, UNIX) or ionto c:Program Filesnewlisp on Windows.
Lutz
Oh. I knew that!
:-$
Hi Lutz,
Seems im unable to set the background of a gs:label..
I thought this worked in 0.7 ? or not? ;-)
Norman.
Hi Lutz,
The code below works..but when I change gs:frame into gs:window
the label seems to be gone?? or someting else?
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp"))
(gs:init)
(gs:get-screen)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:frame 'T 0 (div (- (gs:screen 1) 300) 2) (gs:screen 0) 300 " " )
(gs:set-grid-layout 'T 1 0 0 0 )
(gs:panel 'P)
(gs:set-background 'P 0 0 0)
(gs:label 'TAG "NEEEOOON" )
(gs:add-to 'P 'TAG)
(gs:add-to 'T 'P)
(gs:set-visible 'T true)
(while
(sleep 200)
(gs:set-font 'TAG "Monospaced" 218 "bold")
(gs:set-foreground 'TAG '(0.87058824 0.95686275 0.15294118 0.2))
(sleep 100)
(gs:set-font 'TAG "Monospaced" 216 "bold")
(gs:set-foreground 'TAG 0 0.5 0))
(exit)
The frameless windows in GUI-server is a different animal then all other Widgets in GUI-server, it does not belong to the Java Swing family, but is a lower level widget, and many things behave differently. I haven't figured out all differences yest, you have to experiment.
But if you take out the panel and put the label directly into the windows it works. In either case with gs:windows or with gs:frame, you don't need the panel in-between but can put the label directly. Here is a simplified version which works:
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp"))
(gs:init)
(gs:get-screen)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:window 'T 0 (div (- (gs:screen 1) 300) 2) (gs:screen 0) 300 " " )
(gs:set-background 'T 0 0 0 0) ; put this on MacOS X for floating letters
(gs:label 'TAG "NEEEOOON" )
(gs:add-to 'T 'TAG)
(gs:set-visible 'T true)
(while (sleep 200)
(gs:set-font 'TAG "Monospaced" 218 "bold")
(gs:set-foreground 'TAG '(0.87058824 0.95686275 0.15294118 0.2))
(sleep 100)
(gs:set-font 'TAG "Monospaced" 216 "bold")
(gs:set-foreground 'TAG 0 0.5 0))
(exit)
An additional observation: there is now grid-layout with 1 row and 0 columns, you must have at least 1 column.
But the grid-layout is not necessary here. You can just add anything to a frame or window directly, and it will expand to full size, as if in a grid-layout of one cell. I also do this in frameless-demo.lsp and property-demo.lsp. BTW if you make the window transparent on MacOS X it looks like NEEEOOON is floating.
Lutz
Aha right oke ill give it a try...
Btw.. I used the extra gs:panel because it seems that using this panel
I dont have a flicker in the gs:font loop, which is more smooth...
Seems Java is only refreshing the panel in that case and not the whole screen..
There is a way in Linux to make root-windows transparent,
I read once, cant remember for sure but there are some upgrades needed
on X or some changes. Anyway pitty i dont have the transparent look here ;-)
It would be nice if guiserver would have somekind of a tone-generator..to
make some sounds... not sure if that is easy or possible..
Something like: (gs:tone rate duration volume) but then again that would
become an extra thread perhpas..
Oh yes 2 other questions...
What is the use of gs:dispose ?
And I assume gs:canvas is not doing any extra's yet?
Norman.
Quote
it would be nice if guiserver would have somekind of a tone-generator..to make some sounds...
when doing the 2D graphics stuff I will dig a little bit into the Java multimedia API.
Quote
What is the use of gs:dispose
for destroying frames, dialogs and windows from a program; haven't tried it out much. For other components use gs:remove-from
Quote
And I assume gs:canvas is not doing any extra's yet?
similar to a gs:panel, but used for drawing graphics and text, and it also can have mouse and keyboard handlers attached to it. This way you can roll your own-whatever-you-want :-).
Lutz
Hi, Lutz!
maybe i missed something but newlisp-edit.lsp doesn't work on my system.
it shows an error:
message-dialog:
cannot be applied to MAIN:TheEditor
and then it exits
all other demos works fine
you probably did not update guiserver.jar and guserver.lsp in /usr/share/newlisp or c:Program Filesnewlisp
read here:
http://newlisp.org/downloads/development/guiserver-readme.txt
also, use all files from the same version (0.92 at the moment)
Lutz
i have updated all this files to the latest version before posting here
just checked this again
i have newlisp 9.1.1 installed. maybe this is the reason
9.1.1 runs fine, only versions 9.1.4/5/6 pose a problem, versions 9.1.7/8 are fine too. The error message you are reporting really looks like you are using an outdated version of either guiserver.jar guiserver.lsp or newlisp-edit.lsp. Please check again ;)
Lutz
ps: if that doesn't help tell me which of the 12 demos are running and which not, and are you running Windows XP, or which OS?