Arc Forumnew | comments | leaders | submitlogin
3 points by rocketnia 4193 days ago | link | parent

Here's something that worked for me in Arc 3.1 and Anarki.

Add this toward the bottom of ac.scm so that it can use the xdef syntax defined earlier in the file:

  (require racket/class)
  (require racket/gui/base)
  
  (define frame
    (new frame%
      (label "Example")
      (min-width 200)
      (min-height 200)))
  (xdef frame frame)
  (xdef dynamic-send dynamic-send)
Now from the Arc REPL, you can run this command:

  (dynamic-send frame 'show #t)
Since 'dynamic-send is provided by the racket/class module, doing 'xdef with libraries should work.

Some notes:

If ac.scm used the racket module instead of the mzscheme module, it would have access to all the racket/class bindings to begin with, and then I suppose I'd use a different example. ^_^

In Arc 3.1, the GUI that appears is unresponsive for me. If I Ctrl-C once in the REPL, the REPL stops processing input but the GUI becomes responsive. If I do it again, the GUI closes. I fumbled with threads trying to make the REPL and the GUI work concurrently, but nothing worked, and I've given up for now.

In Anarki, the GUI that appears is unresponsive, but doing Ctrl-C in the REPL exits Racket entirely, including the GUI. Again, my attempts to use threads haven't helped.