Oops.. accidently sent this to rpgoldman only :-|
Just tried on SBCL with recent McCLIM and :timeout 0 works fine >0 values still seem to be blocking forever. Looks like clim-internals:stream-input-wait keeps continuously calling clim-internals:event-queue-listen-or-wait with wrong TIMEOUT. Or maybe not, it's all (still) bit over my head
The :timeout 0 => NIL still seems to a problem on CMUCL, but that's on a few months old version of McCLIM, so maybe it's fixed and irrelevant by now anyway. I really should update my CMUCL stuff on that laptop...
I'm trying to figure out how to do some simple animation, like a clock or process browser that should keep on updating every few seconds. So I thought the way to go would be specializing the READ-COMMAND or READ-FRAME-COMMAND and use the :timeout where approriate. I also thought about using different thread for the pane updating, but I'm not sure if that would be a smart thing to do. So I'm wondering if there's a canonical way to accomplish something like that, some sources perhaps?
BTW, big thanks to all McCLIM developers, fascinating stuff :-)
On Friday, May 6, 2005, at 12:17 PM, Tomi K Neste wrote:
--->8--- snipped for brevity --->8---
I'm trying to figure out how to do some simple animation, like a clock or process browser that should keep on updating every few seconds. So I thought the way to go would be specializing the READ-COMMAND or READ-FRAME-COMMAND and use the :timeout where approriate. I also thought about using different thread for the pane updating, but I'm not sure if that would be a smart thing to do. So I'm wondering if there's a canonical way to accomplish something like that, some sources perhaps?
Hrm. I wrote a little clock thing quite a while ago and had trouble with this. The following post includes some code to show a problem I was having (fixed at the time the mail was sent in actual fact) so it's fully functional and uses scheduled events to redraw a pane:-
http://common-lisp.net/pipermail/mcclim-devel/2003-October/000438.html
Hopefully this will help you out.
-Duncan
BTW, big thanks to all McCLIM developers, fascinating stuff :-) _______________________________________________ mcclim-devel mailing list mcclim-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
On Fri, 6 May 2005 18:11:49 +0100, Duncan Rose duncan@robotcat.demon.co.uk wrote:
Hrm. I wrote a little clock thing quite a while ago and had trouble with this. The following post includes some code to show a problem I was having (fixed at the time the mail was sent in actual fact) so it's fully functional and uses scheduled events to redraw a pane:-
http://common-lisp.net/pipermail/mcclim-devel/2003-October/000438.html
Hopefully this will help you out.
-Duncan
Hmm.. weird. I'm just trying your code snippet on SBCL and it doesn't seem to work. DRAW-SIMPLE gets called only once at the beginning, after that the window seems to go catatonic. No redraws or reactions to window close events. I get WARNING: recursive lock attempt #S(SB-THREAD:MUTEX :NAME "event queue" :LOCK 0 :DATA NIL :VALUE 3737)
It works fine if SCHEDULE-TIMER-EVENT is removed. With no animations, of course ;-) I didn't know about the schedule-timer-event though, so if it's supposed to work that's probably what i need. Thanks for the pointer.