animation

From: Jonathan Berry <berryj_at_dimacs.rutgers.edu>
Date: Thu, 4 Apr 1996 10:06:45 -0500

Many thanks to Erick for that bind-for-dragging fix. I have replaced
the old version with the new at my site and my old problems have gone
away. I haven't had a chance to try out the new features though.

I have a new question for the stklos community. I would like to
experiment with some animations, but I am having trouble doing so.
I can't seem to make intermediate changes show up on the screen.
Consider the following example:
-------------------------------
(require "Tk-classes")
(define c (make <Canvas>))
(pack c)
(define o (make <oval> :parent c :coords '(10 10 20 20) :fill "green"))

(define-generic f)
(define-method f ((o <oval>))
        (set! (fill o) "brown")
        (display "you should now be seeing a brown oval\n")
        (do ((i 0 (+ i 1))) ((= i 100000) #f) #f)
        (set! (fill o) "blue"))

(f o)
--------------------------------
I will never see a brown oval. It is still green during the execution
of the loop, then turns blue at the end. I've tried "delay" and "force"
without success. There is no difference if I use "slot-set!" instead of
the shorthand "set!."

thanks in advance for any help,
        Jon
Received on Thu Apr 04 1996 - 17:08:56 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST