[racket] An elm-like racket language?

From: Gregory Cooper (ghcooper at gmail.com)
Date: Sat Nov 16 14:44:36 EST 2013

On Fri, Nov 15, 2013 at 3:14 PM, Daniel Prager <daniel.a.prager at gmail.com>wrote:

> My current (learning) scenario is to slap a simple GUI onto a specialised
> image editor that I have been working on.
>
> At the moment it feels like the way to learn FrTime is by reading and
> adapting the examples and diving into the source. Is there a tutorial
> somewhere?
>

Looking at the examples is probably the most effective approach. There's
also some background in research papers, and there's the API documentation
included with Racket.

Here's my first working reactive program (I'm figuring things out by
> looking at the animation examples):
>
> #lang frtime
> (require frtime/animation frtime/gui)
>
> (define colors (list "red" "green" "blue"))
>
> (define my-color
>   (list-ref colors (make-choice "Color" colors)))
>
> (display-shapes
>  (list
>   (make-rect (make-posn 0 0) 100 100 (make-rgb 0.5 0 0.5))
>   (make-rect (make-posn 100 100) 100 100 my-color)))
>
>
>
> How might I get the color to change not just when the user selects
> (mouse-ups), but also as a kind of live preview?
>

The underlying choice% control doesn't appear to expose a "hover" event, so
I don't think there's any way to get what you're describing, even in raw
mred. Did I understand your question correctly?

Greg

Thanks
>
> Dan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131116/fb5ea44e/attachment-0001.html>

Posted on the users mailing list.