1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-05-12 08:00:12 +00:00

Fix for console log and echo bug introduced with recent IDE changes.

This commit is contained in:
boxgaming 2024-01-11 08:11:38 -06:00
parent 3ed28f6895
commit 579481861e
2 changed files with 9 additions and 5 deletions

View file

@ -38,7 +38,7 @@ Sub Log (msg As String, msgType As String)
$If Javascript Then
var t = document.querySelector("#warning-container table");
if (!t || appMode != "ide") {
if (!t || IDE.mode() != "ide") {
console.log(msgType + ":" + msg);
return;
}
@ -55,14 +55,14 @@ Sub Log (msg As String, msgType As String)
var container = document.getElementById("output-content");
container.scrollTop = container.scrollHeight;
IDE.changeTab("console");
IDE.showConsole();
IDE.showConsole(true);
$End If
End Sub
Sub Echo (msg As String)
$If Javascript Then
var t = document.querySelector("#warning-container table");
if (!t || appMode != "ide") {
if (!t || IDE.mode() != "ide") {
console.log(msg);
return;
}
@ -73,7 +73,7 @@ Sub Echo (msg As String)
var container = document.getElementById("output-content");
container.scrollTop = container.scrollHeight;
IDE.changeTab("console");
IDE.showConsole();
IDE.showConsole(true);
$End If
End Sub

View file

@ -612,8 +612,11 @@ var IDE = new function() {
tr.append(td);
}
function _showConsole() {
function _showConsole(force) {
consoleVisible = !consoleVisible;
if (force != undefined) {
consoleVisible = force;
}
if (!consoleVisible) {
_e.tbConsoleShow.style.display = "inline-block";
_e.tbConsoleHide.style.display = "none";
@ -1047,6 +1050,7 @@ var IDE = new function() {
}
}
this.mode = function() { return appMode; }
this.getErrorLine = _getErrorLine;
this.runProgram = _runProgram;
this.stopProgram = _stopProgram;