Color with GUI-server in version 9.2.6

Started by newBert, November 25, 2007, 03:29:48 AM

Previous topic - Next topic

newBert

When I do this (with NewLISP 9.2.6 on Win32):
;---------------------
; initialize GUI-server
;---------------------
(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
(gs:init)
;-------------------------
; constants and variables
;-------------------------
; GUI size:
(constant 'WIDTH 500 'HEIGHT 300)
;----------------
; create the GUI
;----------------
(gs:frame 'WIN 100 100 WIDTH (+ HEIGHT 32) "NewLISP 9.2.6 on Win32")
;; the console
(gs:text-area 'Console 'action WIDTH HEIGHT)
(gs:set-editable 'Console nil)
(gs:set-background 'Console gs:white)
(gs:set-font 'Console "Monospaced" 12 "plain")
(gs:set-foreground 'Console gs:black)
(gs:add-to 'WIN 'Console)
(gs:set-visible 'WIN true)
;-----------------
; define actions
;-----------------
(define (action))
;------------------
; events loop
;------------------
(gs:listen true)

I should obtain a window with a white background, thanks to (gs:set-background 'Console gs:white), but now the background is rather purple !

What's the matter ?

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

Lutz

#1
All colors are defined with folating point numbers decimal separator as a point in guiserver.lsp. But your UTF-8 enabled version expects a comma.



Put this as your very first statement in your program:


(set-locale "C")

This will switch back to a point as a separator in your location.



Development version 9.2.7 (later this weekend) will not be UTF-8 enabled and treat everything as in 9.2.5 ;-)



Lutz

newBert

#2
Quote from: "Lutz"All colors are defined with folating point numbers decimal separator as a point in guiserver.lsp. But your UTF-8 enabled version expects a comma.



Put this as your very first statement in your program:


(set-locale "C")

This will switch back to a point as a separator in your location.



Development version 9.2.7 (later this weekend) will not be UTF-8 enabled and treat everything as in 9.2.5 ;-)



Lutz

I'm so silly ! I missed that ... thank you for the reply ;)
<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>