[plt-scheme] some more frtime questions
On Thu, 2008-01-31 at 14:57 -0500, Gregory Cooper wrote:
> > Hmm, it seems (I think) that the filter isn't working somehow, I'm
> > getting the following error when I add it to my scene list. This could
> > be something I'm doing wrong in my render-scene-list procedure:
> >
> > ../../../../usr/local/lib/plt/collects/fluxus-0.14/frisbee.ss::4553.:
> > for-each: expects type <proper list> as 2nd argument, given:
> > #(struct:signal () () #f #<procedure:...time/lang-ext.ss:278:34> 7
> > #<continuation-mark-set> #<parameterization> (#(struct:signal
> > #<struct:event-cons> (#<weak-box>) #f #<procedure:thunk> 6
> > #<continuation-mark-set> #<parameterization> (#(struct:sign...; other
> > arguments were: #<procedure>
>
> Actually, what this looks like to me is that the list behavior (of
> bullets) that you're putting in the scene list is finding its way to
> for-each without having its current value extracted (by 'value-now').
> It might just be a matter of adding a call to 'value-now' somewhere in
> fluxus. If it turns out to be something more complicated than that,
> let me know and I'll take a closer look.
Got it, thanks. After I fixed this though, it only worked for the first
bullet, and returned errors for subsequent ones.
If I remove the filter, it works fine - i.e:
(define all-bullets
(collect-b
bullet-e '()
(lambda (bullet lst)
(cons bullet lst))))
I've also added some waves of enemies, not very well implemented yet,
but a start:
http://www.flickr.com/photos/7905273@N07/2233068235/
cheers,
dave