I'm trying to make a simple GUI repl leveraging the IConsole and ConsoleHost classes and running into problems. I've got an IConsole implementation that directs the Write outputs to a textbox on a winforms form, but it seems like Write is only ever
called with Style.Prompt and never with Out or Error. Basically what happens when I run is that I get the prompt printed to my textbox just fun, but the echo of my statement and the result of running it are only ever sent to the Output window (showing
I'm using Ruby. Here's a sample of what I get:
IronRuby 0.9.1.0 on .NET 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.
If I then type "a = 5" into my input and send it to the engine, by textbox only gets ">>>" added to it, while this ends up in the output window:
I really really really want => 5 to end up in my textbox. Am I doing something wrong? Or is something internal to ConsoleHost always writing to System.Out or something instead of console.Out. I also have textwriters hooked up (in IConsole)
for Output and Error and they never get written to either.