[plt-scheme] Dynamic Slide Creation

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Jul 25 22:18:39 EDT 2004

The best approximation to this is to create a pict with `dc' and in the
body of the procedure, call current-seconds. Something like this:

  (dc (lambda (dc dx dy)
        (send dc draw-string (format "~a" (current-seconds)) dx dy))
      200 50 0 0)

You'll want to do a better job with formatting the string in order to
be able to compute the true bounding box (you don't want that to vary
over time, or things won't be able to render).

If you wanted to have some way to call code the first time that a slide
was rendered, but not after that, that would require changes to
slideshow (and it's not obvious when to consider it the first time, at
least not to me)


At Mon, 26 Jul 2004 01:29:16 +0100, Paulo Jorge O. C. Matos wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Hi all,
> I've done some presentations in PLT-Scheme using the slideshow
> collection which is really nice however, afaik slide creation is static
> instead of dynamic, so I think it is impossible to do the
> following for example:
> Create a slideshow of, for example, 10 slides with the current
> time in them. Of course, the result I want is that if I start
> slideshow at 5pm and I stay one hour in the 1st slide, when I get
> to the 2nd, it'll show 6pm. I think slideshow as it is now, will
> create all slides in the beginning and show in all slides 5pm.
> Wouldn't it be nice to change this? Would it be difficult?
> Cheers,
> -- 
> Paulo J. Matos : pocm [_at_] mega . ist . utl . pt
> Instituto Superior Tecnico - Lisbon
> Computer and Software Eng. - A.I.
>  - > http://mega.ist.utl.pt/~pocm
> ---
>         -> God had a deadline...
>                 So, he wrote it all in Lisp!

Posted on the users mailing list.