Re: [racket-users] redundancy in GUI callback functions

2019-05-25 Thread Sorawee Porncharoenwase
Just abstract the common part out? E.g., (define (update-text-field read-field write-field converter) (define text (send read-field get-value)) (cond [(string=? text "") (send read-field set-field-background (make-object color% 255 255 255 1)) (send write-field set-value "")]

[racket-users] redundancy in GUI callback functions

2019-05-25 Thread Travis Hinkelman
Hi All, I'm working through the tasks in 7guis to learn about GUI programming in Racket. My code for the temperature converter task works as expected but there is a lot of

Re: [racket-users] Re: Online IDE’s for Racket ?

2019-05-25 Thread Stephen De Gabrielle
Thank you Annaia - that is awesome! On Wed, May 1, 2019 at 1:02 PM Annaia Berry wrote: > I set up a Racket web project on Glitch here: > https://glitch.com/~rantstack > > With this you can get live reloading and hosting of a Racket web server. > > On Wed, May 1, 2019 at 1:58 PM Laurent

Re: [racket-users] Re: Online IDE’s for Racket ?

2019-05-25 Thread Hendrik Boom
On Fri, May 24, 2019 at 03:20:47PM -0700, Stephen Foster wrote: > I came across some old posts on compiling Racket for the web, but I was > wondering if there was any recent activity on this. Has anyone ever > compiled Racket (including DrRacket) for the web -- i.e. with Emscripten? > (I know

Re: [racket-users] Macro help

2019-05-25 Thread yfzhe
Another "syntax-case-y" version generates `define-values`: (define-syntax-rule (aux clause ...) (aux-helper () (clause ...))) (define-syntax (aux-helper stx) (syntax-case stx () [(_ ([id val] ...) ()) #'(define-values (id ...) (values val ...))] [(_ (id+val ...) ([id val] more