Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
newBert
Posts: 156 Joined: Fri Oct 28, 2005 5:33 pm
Location: France
Post
by newBert » Sun Nov 25, 2007 11:29 am
When I do this (with NewLISP 9.2.6 on Win32):
Code: Select all
;---------------------
; 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 ?
:)
Lutz
Posts: 5289 Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:
Post
by Lutz » Sun Nov 25, 2007 1:23 pm
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:
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
Posts: 156 Joined: Fri Oct 28, 2005 5:33 pm
Location: France
Post
by newBert » Sun Nov 25, 2007 1:30 pm
Lutz wrote: 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:
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 ;)