From: Timothy J. H. <tim...@ma...> - 2004-05-22 19:24:28
|
On May 22, 2004, at 2:16 PM, matthew grisius wrote: > Ok, a 'dynamic environment' is shared between two REPLs. The two > separate Evaluators are able to have their own input, output, and > error ports: > > (.input$ ev1 (my-input-port my-window-1)) > (.output$ ev1 (my-output-port my-window-1)) > (.error$ ev1 (my-error-port my-window-1)) > > (.input$ ev2 (my-input-port my-window-2)) > (.output$ ev2 (my-output-port my-window-2)) > (.error$ ev2 (my-error-port my-window-2)) > > Does that make more sense and do you see any problems with that > approach? Thanks. It looks OK. Your approach works with the interact.Interactor class that Ken Anderson built. In the code below we create three interaction windows. The first two share an INTERACTION_ENVIRONMENT and the third has an independent one. tim% java jscheme.REPL JScheme 7.0 5/19/04 http://jscheme.sourceforge.net > (define z1 (jscheme.JScheme.)) jscheme.JScheme@1c0d60 > (define z2 (jscheme.JScheme.)) jscheme.JScheme@9bad5a > (define I1 (interact.Interactor. "" z1)) 2004-05-22 15:12:09.130 java[5131] _initWithWindowNumber: error creating graphics ctxt object for ctxt:99623, window:1151303680 interact.Interactor@34151f > (.INTERACTION_ENVIRONMENT$ (.getEvaluator z2) (.INTERACTION_ENVIRONMENT$ (.getEvaluator z1))) jsint.DynamicEnvironment@ff6de1 > (define I2 (interact.Interactor. "" z2)) interact.Interactor@c5f20f > (define z3 (jscheme.JScheme.)) jscheme.JScheme@c4a2d3 > (define I3 (interact.Interactor. "" z3)) interact.Interactor@9f2588 > We may want to add some support in the jscheme package for doing this kind of manipulation, e.g. jscheme.SchemeEvaluator could have a .getInteractionEnvironment method and a setInteractionEnvironment method ---Tim--- |