newLISP Fan Club

Forum => newLISP Graphics & Sound => Topic started by: newBert on November 25, 2007, 03:29:48 AM

Title: Color with GUI-server in version 9.2.6
Post by: newBert on November 25, 2007, 03:29:48 AM
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 ?

:)
Title:
Post by: Lutz on November 25, 2007, 05:23:11 AM
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
Title:
Post by: newBert on November 25, 2007, 05:30:23 AM
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 ;)