Hi Lutz,
There is something strange with 'gs:hide-tag,
sometimes it updates sometimes it does not..
If I use the boolean or not it does not update the screen.
show-tag works oke..
The example below does not work properly..
I need to resize the screen to get gs:hide-tag working..(an event)..
With or without the 'true is does not work refresh,
seems gs:hide-tag does it only once and then needs a refresh..
If I remove the sleep's, it doesnt help eighter..
Also, Seems that the rewrite of the tag changes my color, the red
in the screen turn 1 step darker...this also happens with gs:update..
#!/usr/bin/newlisp
;;;; initialization
(if (= ostype "Win32")
(load (string (env "PROGRAMFILES") "/newlisp/guiserver.lsp"))
(load "/usr/share/newlisp/guiserver.lsp"))
(gs:init)
(gs:get-screen)
(gs:frame 't 100 100 200 200 "")
(gs:set-background 't gs:black)
(gs:canvas 'canvas t)
(gs:add-to 't 'canvas)
(gs:set-visible 't true)
(for (r 0 200 6)
(gs:fill-circle (string "L" r) (+ r 3) 9 3 gs:red))
(sleep 5000)
(gs:hide-tag "L6" true)
(sleep 5000)
(gs:show-tag "L6" true)
(sleep 5000)
(gs:hide-tag "L6" true)
Yes I can't get this one to work. I have used hide-tag successfully, though. (http://www.alh.net/newlisp/phpbb/viewtopic.php?t=1805&highlight=hidetag)
but I can't see why that works OK.
The canvas needs a backgroud color in order to get repainted:
http://newlisp.org/guiserver/guiserver.lsp.html#gs_canvas
in your program put this after your canvas definition:
(gs:set-background 'canvas gs:black)
Lutz
ps: the background color is used to erase the canvas before repainting it.
Pretty tricky actualy, i was under the impression that a background on
the frame was enough..., but it now works like a charm thanks!
Norman.
Aah! Of course - that explains it...