//開発時クロスドメイン許可で起動するには、
// /Applications/Google\ Chrome.app/ --allow-file-access-from-files --disable-web-security
-var DebugModeEnabled = true;
+var IsDebugModeEnabledOnBoot = true;
function AI(messageBoxDOMObject, debugBoxDOMObject){
//ブラウザチェック
this.inputProcess_InternalConsole,
this.inputProcess_CompileELCHNOS_OSECPU,
];
- if(!DebugModeEnabled){
+ if(!IsDebugModeEnabledOnBoot){
this.mode = this.UUID_Mode_Standard;
this.processByMode = this.inputProcess_Standard;
} else{
this.processByMode = this.inputProcess_InternalConsole;
}
+ //初期データの読み込み
AI_Bootstrap(this);
this.debug("AI system initialized.\n");
//表示処理
if(this.messageBox && this.messageBoxBuffer != ""){
//messageBox
- var str = this.messageBox.innerHTML + this.messageBoxBuffer;
+ var str = this.messageBox.value + this.messageBoxBuffer;
this.messageBoxBuffer = "";
if(str.length > this.maxMessageStringLength){
str = str.slice(str.length - (this.maxMessageStringLength >> 1));
}
- this.messageBox.innerHTML = str;
+ this.messageBox.value = str;
this.messageBox.scrollTop = this.messageBox.scrollHeight;
}
if(this.debugBox && this.debugBoxBuffer != ""){
//debugBox
- var str = this.debugBox.innerHTML + this.debugBoxBuffer;
+ var str = this.debugBox.value + this.debugBoxBuffer;
this.debugBoxBuffer = "";
if(str.length > this.maxDebugStringLength){
str = str.slice(str.length - (this.maxDebugStringLength >> 1));
}
- this.debugBox.innerHTML = str;
+ this.debugBox.value = str;
this.debugBox.scrollTop = this.debugBox.scrollHeight;
}
},
//show wordList
this.debug("wordList:" + this.memory.wordList.length + "\n" );
this.memory.wordList.logEachPropertyNamed("str", function(s){ that.debug(s); });
+ } else if(str == "show rlc"){
+ //show ReadLineCount
+ this.debug(this.memory.dbInfo.readLineCount + " lines was inputted.\n" );
} else if(str.indexOf("inputFromURL ") == 0){
//webページを読み込む
//inputFromURL http://www.aozora.gr.jp/cards/000148/files/773_14560.html
} else if(str == "savemem"){
this.memory.saveMemory();
+ } else if(str == "netDB update"){
+ this.networkManager.networkDBUpdate();
+ } else if(str == "netDB viewall"){
+ this.networkManager.networkDBViewAll();
} else{
this.debug("Unknown command [" + str + "].\n");
this.debug("Command list:\n");
var that = this;
var cc = new ELCHNOSCompiler(function(s){ that.debug(s); }, this.downloadBox);
- if(cc.compile(str) == null){
+ if(cc.compile(str) != null){
cc.saveBinary();
}