Re: animation

From: Matthew Welland <mwelland_at_pdx201>
Date: Thu, 4 Apr 1996 09:19:50 -0800 (PST)

Just insert an (update) where you want the display to be updated.

Also note you could use "after" to generate a delay.

On Thu, 4 Apr 1996, Jonathan Berry wrote:

[..]
> -------------------------------
> (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")
---> (update)
> (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
>


     == Matt Welland | Senior Design Automation Engineer ==
     == Intel Corp. | mwelland_at_ichips.intel.com ==
Received on Thu Apr 04 1996 - 19:22:18 CEST

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