Node pdp11 utility can now properly initialize all machine components (although there are still some type issues with some of the properties we're extracting from the machine XML)
This commit is contained in:
parent
530c24cbb8
commit
51c7b96f3c
3 changed files with 91 additions and 35 deletions
|
|
@ -290,7 +290,7 @@ class Component {
|
|||
if (!COMPILED) {
|
||||
Component.println(s, "notice", id);
|
||||
}
|
||||
if (!fPrintOnly) Web.alertUser((id? (id + ": ") : "") + s);
|
||||
if (!fPrintOnly && Web.alertUser) Web.alertUser((id? (id + ": ") : "") + s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -303,7 +303,7 @@ class Component {
|
|||
if (!COMPILED) {
|
||||
Component.println(s, "warning");
|
||||
}
|
||||
Web.alertUser(s);
|
||||
if (Web.alertUser) Web.alertUser(s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -316,7 +316,7 @@ class Component {
|
|||
if (!COMPILED) {
|
||||
Component.println(s, "error");
|
||||
}
|
||||
Web.alertUser(s);
|
||||
if (Web.alertUser) Web.alertUser(s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -188,6 +188,17 @@ class Web {
|
|||
sURL = sURL.replace(/^http:\/\/archive.pcjs.org(\/.*)\/([^\/]*)$/, "$1/archive/$2");
|
||||
}
|
||||
|
||||
if (NODE) {
|
||||
/*
|
||||
* We don't even need to load Component, because we can't use any of the code below
|
||||
* within Node anyway. Instead, we must hand this request off to our network library.
|
||||
*
|
||||
* if (!Component) Component = require("./component");
|
||||
*/
|
||||
var Net = require("./netlib");
|
||||
return Net.getResource(sURL, dataPost, fAsync, done);
|
||||
}
|
||||
|
||||
var xmlHTTP = (window.XMLHttpRequest ? new window.XMLHttpRequest() : new window.ActiveXObject("Microsoft.XMLHTTP"));
|
||||
if (fAsync) {
|
||||
xmlHTTP.onreadystatechange = function()
|
||||
|
|
|
|||
Loading…
Reference in a new issue