[plt-scheme] MrEd's stdio REPL with GUI code

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Aug 21 09:02:16 EDT 2002

Evaluate

  (current-eventspace (make-eventspace))

as the first expression in the stdio REPL, and then it will work the
way you want.

The GUI REPL creates a new eventspace for evaluating expressions, so
the expressions are not evaluated in MrEd's main thread. The stdio
REPL, however, uses the main thread for evaluating expressions, so that
it acts just like MzScheme.

Matthew


At Tue, 20 Aug 2002 18:56:19 -0400, Eduardo Cavazos wrote:
> ;;;;;;;;; /tmp/test-mred.scm ;;;;;;;;;;
> 
> (define *frame*
>   (make-object frame% "Testing MrEd" #f #f #f #f #f '()))
> 
> (define	*text-field*
>   (make-object	text-field% #f *frame* (lambda (a b) #t) "" '(single)))
> 
> (send *frame* show #t)
> 
> ;;;;;;;;;; end of file ;;;;;;;;;;
> 
> If you first start MrEd:
> 
> 	$ mred
> 
> and load that file at the graphical REPL:
> 
> 	> (load "/tmp/test-mred.scm")
> 
> the window appears and you can type into the text-field. You can also
> continue to work in the REPL.
> 
> However, if you start MrEd and opt for the stdio REPL:
> 
> 	$ mred -z
> 
> and then load the file, the window appears but it is seemingly
> nonresponsive. The stdio REPL continues to respond however.
> 
> I've tried this in 103p1 and 201.
> 
> Anyone know how to get around this problem? Specifically, I'd like to run
> mred, load a file which does some gui stuff, and still interact with mred
> via the stdio REPL.
> 
> Ed
> 
> 




Posted on the users mailing list.