Commit f6fdd33e authored by Raghav Khanna's avatar Raghav Khanna

Defualt to asking for user input from window prompt if no fresh input is currently set

parent 1804891e
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
content="Web site created using create-react-app" content="Web site created using create-react-app"
/> />
<script> <script>
var EMULATOR_CONSOLE_READ = ""; var EMULATOR_CONSOLE_READ = () => { return window.prompt()};
var EMULATOR_IS_INPUT = false;
</script> </script>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!-- <!--
......
...@@ -65,12 +65,11 @@ class App extends React.Component { ...@@ -65,12 +65,11 @@ class App extends React.Component {
readInputCallBack = (codeToEval) => { readInputCallBack = (codeToEval) => {
console.log(test); console.log(test);
if (!window.EMULATOR_IS_INPUT) { // if (!window.EMULATOR_IS_INPUT) {
window.EMULATOR_CONSOLE_READ = window.prompt() // window.EMULATOR_CONSOLE_READ = window.prompt()
} // }
eval(codeToEval); eval(codeToEval);
window.EMULATOR_CONSOLE_READ = ""; window.EMULATOR_CONSOLE_READ = () => { return window.prompt()};
window.EMULATOR_IS_INPUT = false;
}; };
processWaccCode = async (code) => { processWaccCode = async (code) => {
...@@ -170,7 +169,7 @@ class App extends React.Component { ...@@ -170,7 +169,7 @@ class App extends React.Component {
}} }}
> >
<Terminal commandPassThrough={cmd => { <Terminal commandPassThrough={cmd => {
window.EMULATOR_CONSOLE_READ = cmd[0]; window.EMULATOR_CONSOLE_READ = () => {return cmd[0]};
window.EMULATOR_IS_INPUT = true; window.EMULATOR_IS_INPUT = true;
}} watchConsoleLogging hideTopBar allowTabs={false}/> }} watchConsoleLogging hideTopBar allowTabs={false}/>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment