Merge branch 'next-release'
This commit is contained in:
commit
6b208a9aca
30 changed files with 331 additions and 310 deletions
|
|
@ -301,7 +301,7 @@ Component.getMachineResources = function(idMachine)
|
|||
*/
|
||||
Component.log = function(s, type)
|
||||
{
|
||||
if (DEBUG) {
|
||||
if (!COMPILED) {
|
||||
if (s) {
|
||||
var sElapsed = "", sMsg = (type? (type + ": ") : "") + s;
|
||||
if (typeof usr != "undefined") {
|
||||
|
|
@ -352,7 +352,7 @@ Component.assert = function(f, s)
|
|||
*/
|
||||
Component.println = function(s, type, id)
|
||||
{
|
||||
if (DEBUG) {
|
||||
if (!COMPILED) {
|
||||
Component.log((id? (id + ": ") : "") + (s? ("\"" + s + "\"") : ""), type);
|
||||
}
|
||||
};
|
||||
|
|
@ -368,7 +368,7 @@ Component.println = function(s, type, id)
|
|||
*/
|
||||
Component.notice = function(s, fPrintOnly, id)
|
||||
{
|
||||
if (DEBUG) {
|
||||
if (!COMPILED) {
|
||||
Component.println(s, "notice", id);
|
||||
}
|
||||
if (!fPrintOnly) web.alertUser((id? (id + ": ") : "") + s);
|
||||
|
|
@ -381,7 +381,7 @@ Component.notice = function(s, fPrintOnly, id)
|
|||
*/
|
||||
Component.warning = function(s)
|
||||
{
|
||||
if (DEBUG) {
|
||||
if (!COMPILED) {
|
||||
Component.println(s, "warning");
|
||||
}
|
||||
web.alertUser(s);
|
||||
|
|
@ -394,7 +394,7 @@ Component.warning = function(s)
|
|||
*/
|
||||
Component.error = function(s)
|
||||
{
|
||||
if (DEBUG) {
|
||||
if (!COMPILED) {
|
||||
Component.println(s, "error");
|
||||
}
|
||||
web.alertUser(s);
|
||||
|
|
@ -716,7 +716,7 @@ Component.prototype = {
|
|||
}
|
||||
control.value += s + "\n";
|
||||
control.scrollTop = control.scrollHeight;
|
||||
if (DEBUG && window && window.console) console.log(s);
|
||||
if (!COMPILED && window && window.console) console.log(s);
|
||||
};
|
||||
}(control));
|
||||
/**
|
||||
|
|
@ -750,7 +750,7 @@ Component.prototype = {
|
|||
* @param {string} [type] is the message type
|
||||
*/
|
||||
log: function(s, type) {
|
||||
if (DEBUG) {
|
||||
if (!COMPILED) {
|
||||
Component.log(s, type || this.id || this.type);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,11 +30,15 @@
|
|||
|
||||
var Keys = {
|
||||
/*
|
||||
* Alphanumeric and other common (printable) ASCII codes.
|
||||
* Keys and/or key combinations that generate common ASCII codes.
|
||||
*
|
||||
* TODO: Determine what we can do to get ALL constants like these inlined (enum doesn't seem to
|
||||
* get the job done); the problem seems to be limited to property references that use quotes, which
|
||||
* is why I've 'unquoted' as many of them as possible.
|
||||
* NOTE: If you're looking for a general-purpose ASCII code table, see str.ASCII in strlib.js;
|
||||
* if something's missing, that's probably the more appropriate table to add it to.
|
||||
*
|
||||
* TODO: The Closure Compiler doesn't inline all references to these values, at least those with
|
||||
* quoted property names, which is why I've 'unquoted' as many of them as possible. One solution
|
||||
* would be to add mnemonics for all of them, not just the non-printable ones (eg, SPACE instead
|
||||
* of ' ', AMP instead of '&', etc.)
|
||||
*/
|
||||
ASCII: {
|
||||
BREAK: 0, CTRL_A: 1, CTRL_B: 2, CTRL_C: 3, CTRL_D: 4, CTRL_E: 5, CTRL_F: 6, CTRL_G: 7,
|
||||
|
|
|
|||
|
|
@ -553,12 +553,16 @@ str.trim = function(s)
|
|||
};
|
||||
|
||||
/*
|
||||
* Any codes commented out in the following table are deemed "printable"
|
||||
* Future home of a general-purpose ASCII table. TODO: Flesh it out.
|
||||
*/
|
||||
str.ASCII = {
|
||||
LF: 0x0A,
|
||||
CR: 0x0D
|
||||
};
|
||||
|
||||
/*
|
||||
* Table for converting "unprintable" ASCII codes into mnemonics, to more clearly see what's being printed.
|
||||
*/
|
||||
str.aASCIICodes = {
|
||||
0x00: "NUL",
|
||||
0x01: "SOH", // (CTRL_A) Start of Heading
|
||||
|
|
@ -570,10 +574,10 @@ str.aASCIICodes = {
|
|||
0x07: "BEL", // (CTRL_G) Bell
|
||||
0x08: "BS", // (CTRL_H) Backspace
|
||||
0x09: "TAB", // (CTRL_I) Horizontal Tab
|
||||
// 0x0A: "LF", // (CTRL_J) Line Feed (New Line)
|
||||
0x0A: "LF", // (CTRL_J) Line Feed (New Line)
|
||||
0x0B: "VT", // (CTRL_K) Vertical Tab
|
||||
0x0C: "FF", // (CTRL_L) Form Feed (New Page)
|
||||
// 0x0D: "CR", // (CTRL_M) Carriage Return
|
||||
0x0D: "CR", // (CTRL_M) Carriage Return
|
||||
0x0E: "SO", // (CTRL_N) Shift Out
|
||||
0x0F: "SI", // (CTRL_O) Shift In
|
||||
0x10: "DLE", // (CTRL_P) Data Link Escape
|
||||
|
|
@ -602,7 +606,7 @@ str.aASCIICodes = {
|
|||
*/
|
||||
str.toASCIICode = function(b)
|
||||
{
|
||||
var s = str.aASCIICodes[b];
|
||||
var s = (b != str.ASCII.CR && b != str.ASCII.LF? str.aASCIICodes[b] : null);
|
||||
if (s) {
|
||||
s = '<' + s + '>';
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue