diff --git a/blocks.js b/blocks.js index d58474e4..74c3574c 100644 --- a/blocks.js +++ b/blocks.js @@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2013-July-31'; +modules.blocks = '2013-August-01'; var SyntaxElementMorph; var BlockMorph; @@ -798,7 +798,10 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { null, // text false, // numeric? { - '--line--' : ['--line--'] + 'whitespace' : ['whitespace'], + 'line' : ['line'], + 'tab' : ['tab'], + 'cr' : ['cr'] }, false // read-only ); diff --git a/history.txt b/history.txt index f60dd599..5fd3680e 100755 --- a/history.txt +++ b/history.txt @@ -1833,3 +1833,7 @@ ______ 130731 ------ * Blocks, Threads, Objects: experimental text SPLIT primitive in the operators category + +130801 +------ +* Blocks, Threads: "whitespace" & other options in SPLIT reporter's dropdown diff --git a/threads.js b/threads.js index 6b731643..a6ab70e9 100644 --- a/threads.js +++ b/threads.js @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2013-July-31'; +modules.threads = '2013-August-01'; var ThreadManager; var Process; @@ -2003,10 +2003,19 @@ Process.prototype.reportUnicodeAsLetter = function (num) { Process.prototype.reportTextSplit = function (string, delimiter) { var str = (string || '').toString(), del; - - if (this.inputOption(delimiter) === '--line--') { + switch (this.inputOption(delimiter)) { + case 'line': del = '\n'; - } else { + break; + case 'tab': + del = '\t'; + break; + case 'cr': + del = '\r'; + break; + case 'whitespace': + return new List(str.trim().split(/[\t\r\n ]+/)); + default: del = (delimiter || '').toString(); } return new List(str.split(del));