Lively Kernel canvas
//
DraftingSpellChecker40
10000.020262592084505274Wikicontroltrue
10007.486895686572554e-13Wikicontroltrue
10000.0014562432160499443Wikicontroltrue
10002.086442296274789e-7Wikicontroltrue
10000.0000039867647658487275Wikicontroltrue
10000.09850099550213069Wikicontroltrue
10006.706824823328569Wikicontroltrue
Igotsomething<?xmlversion="1.0"encoding="UTF-8"?><spellresulterror="0"clipped="0"charschecked="49"><co="10"l="6"s="1">wrongwrungwringwrongswronger</c><co="26"l="6"s="1">greenGreenGreeneGrangran</c></spellresult>wrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>falsetruefalse0
c.o=10falsetruefalse0
c.o=26falsetruefalse0
spellCheck=[objectObject]falsetruefalse0
colorfrom10to16falsetruefalse0
spellCheck=[objectObject]falsetruefalse0
colorfrom26to32falsetruefalse0
fexecutedfalsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,2000,1200])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/DraftSpellChecker.xhtml?1265292831162falsetruefalse0
extendForSerializationundefinedfalsetruefalse0
Warn:unexpected:#<Relay{{"PropList":"+PropList","PropName":"PropName","PropText":"PropText","Inspectee":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"List":"-PropList","Selection":"+PropName","Menu":"-PropMenu"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"Text":"PropText","DoitContext":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"DoitContext":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"PropList":"+PropList","PropName":"PropName","PropText":"PropText","Inspectee":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"List":"-PropList","Selection":"+PropName","Menu":"-PropMenu"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"Text":"PropText","DoitContext":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"DoitContext":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"PropList":"+PropList","PropName":"PropName","PropText":"PropText","Inspectee":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"List":"-PropList","Selection":"+PropName","Menu":"-PropMenu"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"Text":"PropText","DoitContext":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
Warn:unexpected:#<Relay{{"DoitContext":"-Inspectee"}}>sdelegateis#<Record{{"PropList":{},"PropName":{},"Inspectee":{},"PropText":{},"PropMenu":{}}}>s delegate is #"]]>falsetruefalse0
status204onPUThttp://lively-kernel.org/repository/webwerkstatt/DraftSpellChecker.xhtmlfalsetruefalse0
successpublishingworldathttp://lively-kernel.org/repository/webwerkstatt/DraftSpellChecker.xhtml,status204falsetruefalse0
LayerSpellCheckerLayerisalreadytherefalsetruefalse0
spellCheck:greenGreenGreeneGrangranfalsetruefalse0
-------------------------------------------falsetruefalse0
invoke120547:TextMorph([0,0,337,21.200000762939453])falsetruefalse0
correctfrom26to266with:greenfalsetruefalse0
spellCheck:wrongwrungwringwrongswrongerfalsetruefalse0
-------------------------------------------falsetruefalse0
invoke120547:TextMorph([0,0,337,21.200000762939453])falsetruefalse0
correctfrom10to106with:wrongfalsetruefalse0
failedtoencodeResult=#<NetRequest{POSThttp://lively-kernel.org/cgi/send_req.pl?lang=en&hl=en}>"]]>falsetruefalse0
Igotsomething<?xmlversion="1.0"encoding="UTF-8"?><spellresulterror="0"clipped="0"charschecked="50"><co="10"l="6"s="1">wrongwrungwringwrongswronger</c><co="26"l="6"s="1">greenGreenGreeneGrangran</c></spellresult>wrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>falsetruefalse0
c.o=10falsetruefalse0
c.o=26falsetruefalse0
spellCheck=[objectObject]falsetruefalse0
colorfrom10to16falsetruefalse0
spellCheck=[objectObject]falsetruefalse0
colorfrom26to32falsetruefalse0
fexecutedfalsetruefalse0
-------------------------------------------falsetruefalse0
invoke133883:ComponentBoxMorph([0,0,630,300])falsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,2000,1200])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/DraftSpellChecker.xhtml?1265292831162falsetruefalse0
extendForSerializationundefinedfalsetruefalse01058-1nulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
[3,4,5,6]truetrue100false
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
Thatisawroengtextwasgreeanchecker
varstring=this.getTextInput();vartxt=newlively.Text.Text(string,{});input.each(function(ea){vara=ea.offset;varb=a+ea.length;console.log("spellCheck="+ea);varstyle={color:"red",spellchecksuggestions:ea.suggestions};txt.emphasize(style,a,b);console.log("colorfrom"+a+"to"+b)})morph=this.fabrik.morph.submorphs.detect(function(ea){returnea.name=="TestText"});morph.setRichText(txt);console.log("fexecuted");15truetruefalsetruetruefalsefalsetruefalse
functionf(input)falsenullfalse
truefalsenull
truefalsenull
truefalsenull
false
nullnullnull
true
null1.5707963267948966nullfalsetruenullfalse
null1.5707963267948966nullfalsetruenullfalse
truefalsenull
<?xmlversion="1.0"encoding="UTF-8"?><spellresulterror="0"clipped="0"charschecked="50"><co="10"l="6"s="1">wrongwrungwringwrongswronger</c><co="26"l="6"s="1">greenGreenGreeneGrangran</c></spellresult>wrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>truetruefalsewrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>3truetruefalsefalsetruefalsefalse
nullnullwrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>
Thatisawroengtextwasgreeancheckertruetruefalsetruetruefalsefalsetruefalsefalse
nullnull
truefalsenull
truefalsenull
nullnullfalsetruenullfalse
null3.141592653589793nullfalsetruenullfalse
nullnullfalsetruefalse
null1.5707963267948966nullfalsetruenullfalse
null3.141592653589793nullfalsetruefalse
//wedonothaveapostcommand...varself=this;varrequest=newNetRequest({setStatus:"result",model:{result:function(status){console.log("Igotsomething"+request.getResponseText());GoogleSpellerLastResponse=request.getResponseXML()self.setResponseText(request.getResponseText());}}});url="http://lively-kernel.org/cgi/send_req.pl?lang=en&hl=en"post='<?xmlversion="1.0"encoding="utf-8"?>\<spellrequesttextalreadyclipped="0"ignoredups="0"ignoredigits="1"ignoreallcaps="1">\<text>'+input.asString()+'</text>\</spellrequest>';request.post(url,post); \\\n\t\\\n ' +input.asString() +'\\\n';\r\rrequest.post( url, post);\r\r\r\r"]]>truetruefalse \\\n\t\\\n ' +input.asString() +'\\\n';\r\rrequest.post( url, post);\r\r\r\r"]]>7truetruefalsefalsetruefalse
functionf(input)falsenullfalse
truefalsenull
truefalsenull
truefalsenull
truefalsenullfalse
nullnullnull","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"spellresult":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}}},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","js":{"c":{"#text":"wrong\twrung\twring\twrongs\twronger"}},"isJSONConformant":true},{"string":"\t\twrong\twrung\twring\twrongs\twronger","xml":{"wholeText":"wrong\twrung\twring\twrongs\twronger","length":32,"data":"wrong\twrung\twring\twrongs\twronger","previousSibling":null,"parentNode":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","lastChild":null,"baseURI":"http://lively-kernel.org/cgi/send_req.pl?lang=en&hl=en","firstChild":null,"nodeValue":"wrong\twrung\twring\twrongs\twronger","textContent":"wrong\twrung\twring\twrongs\twronger","nodeType":3,"nodeName":"#text","prefix":null,"childNodes":null,"nextSibling":null,"attributes":null,"ownerDocument":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","namespaceURI":null,"localName":null,"parentElement":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","splitText":null,"replaceWholeText":null,"replaceData":null,"substringData":null,"appendData":null,"deleteData":null,"insertData":null,"addEventListener":null,"appendChild":null,"removeChild":null,"insertBefore":null,"cloneNode":null,"replaceChild":null,"hasChildNodes":null,"hasAttributes":null,"isSupported":null,"isEqualNode":null,"dispatchEvent":null,"isDefaultNamespace":null,"normalize":null,"compareDocumentPosition":null,"removeEventListener":null,"isSameNode":null,"lookupPrefix":null,"lookupNamespaceURI":null,"NOTATION_NODE":12,"CDATA_SECTION_NODE":4,"ELEMENT_NODE":1,"DOCUMENT_POSITION_DISCONNECTED":1,"ENTITY_NODE":6,"TEXT_NODE":3,"ENTITY_REFERENCE_NODE":5,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC":32,"DOCUMENT_FRAGMENT_NODE":11,"PROCESSING_INSTRUCTION_NODE":7,"DOCUMENT_POSITION_PRECEDING":2,"DOCUMENT_TYPE_NODE":10,"COMMENT_NODE":8,"DOCUMENT_POSITION_FOLLOWING":4,"ATTRIBUTE_NODE":2,"DOCUMENT_POSITION_CONTAINED_BY":16,"DOCUMENT_NODE":9,"DOCUMENT_POSITION_CONTAINS":8},"js":{"#text":"wrong\twrung\twring\twrongs\twronger"},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","js":{"c":{"#text":"wrong\twrung\twring\twrongs\twronger"}},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}},"isJSONConformant":true},{"string":"\t\tcharger\tchge\tCheer\tchecker\tcheer","xml":{"wholeText":"charger\tchge\tCheer\tchecker\tcheer","length":32,"data":"charger\tchge\tCheer\tchecker\tcheer","previousSibling":null,"parentNode":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","lastChild":null,"baseURI":"http://lively-kernel.org/cgi/send_req.pl?lang=en&hl=en","firstChild":null,"nodeValue":"charger\tchge\tCheer\tchecker\tcheer","textContent":"charger\tchge\tCheer\tchecker\tcheer","nodeType":3,"nodeName":"#text","prefix":null,"childNodes":null,"nextSibling":null,"attributes":null,"ownerDocument":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","namespaceURI":null,"localName":null,"parentElement":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","splitText":null,"replaceWholeText":null,"replaceData":null,"substringData":null,"appendData":null,"deleteData":null,"insertData":null,"addEventListener":null,"appendChild":null,"removeChild":null,"insertBefore":null,"cloneNode":null,"replaceChild":null,"hasChildNodes":null,"hasAttributes":null,"isSupported":null,"isEqualNode":null,"dispatchEvent":null,"isDefaultNamespace":null,"normalize":null,"compareDocumentPosition":null,"removeEventListener":null,"isSameNode":null,"lookupPrefix":null,"lookupNamespaceURI":null,"NOTATION_NODE":12,"CDATA_SECTION_NODE":4,"ELEMENT_NODE":1,"DOCUMENT_POSITION_DISCONNECTED":1,"ENTITY_NODE":6,"TEXT_NODE":3,"ENTITY_REFERENCE_NODE":5,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC":32,"DOCUMENT_FRAGMENT_NODE":11,"PROCESSING_INSTRUCTION_NODE":7,"DOCUMENT_POSITION_PRECEDING":2,"DOCUMENT_TYPE_NODE":10,"COMMENT_NODE":8,"DOCUMENT_POSITION_FOLLOWING":4,"ATTRIBUTE_NODE":2,"DOCUMENT_POSITION_CONTAINED_BY":16,"DOCUMENT_NODE":9,"DOCUMENT_POSITION_CONTAINS":8},"js":{"#text":"charger\tchge\tCheer\tchecker\tcheer"},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}},"isJSONConformant":true},{"string":"","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"spellresult":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}}},"isJSONConformant":true}]]]> \\\n\t\\\n ' +input.asString() +'\\\n';\r\rrequest.post( url, post);\r\r\r\r"]]>wrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>
if(!Global["GoogleSpellerLastResponse"])returnnodes=$A(GoogleSpellerLastResponse.childNodes[0].childNodes).collect(function(ea){console.log("c.o="+Number(ea.getAttribute("o")));return{offset:Number(ea.getAttribute("o")),length:Number(ea.getAttribute("l")),confidence:Number(ea.getAttribute("s")),suggestions:ea.textContent}})this.setNodes(nodes)6truetruefalsetruetruefalsefalsetruefalse
functionf(input)falsenullfalse
truefalsenull
truefalsenull
truefalsenull
false
nullnullwrong\twrung\twring\twrongs\twrongergreen\tGreen\tGreene\tGran\tgran"]]>null
truefalsenull
truefalsenull
truenulltrue
nullnulltruenullwrong\twrung\twring\twrongs\twrongercharger\tchge\tCheer\tchecker\tcheer"]]>","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"spellresult":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}}},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","js":{"c":{"#text":"wrong\twrung\twring\twrongs\twronger"}},"isJSONConformant":true},{"string":"\t\twrong\twrung\twring\twrongs\twronger","xml":{"wholeText":"wrong\twrung\twring\twrongs\twronger","length":32,"data":"wrong\twrung\twring\twrongs\twronger","previousSibling":null,"parentNode":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","lastChild":null,"baseURI":"http://lively-kernel.org/cgi/send_req.pl?lang=en&hl=en","firstChild":null,"nodeValue":"wrong\twrung\twring\twrongs\twronger","textContent":"wrong\twrung\twring\twrongs\twronger","nodeType":3,"nodeName":"#text","prefix":null,"childNodes":null,"nextSibling":null,"attributes":null,"ownerDocument":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","namespaceURI":null,"localName":null,"parentElement":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","splitText":null,"replaceWholeText":null,"replaceData":null,"substringData":null,"appendData":null,"deleteData":null,"insertData":null,"addEventListener":null,"appendChild":null,"removeChild":null,"insertBefore":null,"cloneNode":null,"replaceChild":null,"hasChildNodes":null,"hasAttributes":null,"isSupported":null,"isEqualNode":null,"dispatchEvent":null,"isDefaultNamespace":null,"normalize":null,"compareDocumentPosition":null,"removeEventListener":null,"isSameNode":null,"lookupPrefix":null,"lookupNamespaceURI":null,"NOTATION_NODE":12,"CDATA_SECTION_NODE":4,"ELEMENT_NODE":1,"DOCUMENT_POSITION_DISCONNECTED":1,"ENTITY_NODE":6,"TEXT_NODE":3,"ENTITY_REFERENCE_NODE":5,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC":32,"DOCUMENT_FRAGMENT_NODE":11,"PROCESSING_INSTRUCTION_NODE":7,"DOCUMENT_POSITION_PRECEDING":2,"DOCUMENT_TYPE_NODE":10,"COMMENT_NODE":8,"DOCUMENT_POSITION_FOLLOWING":4,"ATTRIBUTE_NODE":2,"DOCUMENT_POSITION_CONTAINED_BY":16,"DOCUMENT_NODE":9,"DOCUMENT_POSITION_CONTAINS":8},"js":{"#text":"wrong\twrung\twring\twrongs\twronger"},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twronger\"}","js":{"c":{"#text":"wrong\twrung\twring\twrongs\twronger"}},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}},"isJSONConformant":true},{"string":"\t\tcharger\tchge\tCheer\tchecker\tcheer","xml":{"wholeText":"charger\tchge\tCheer\tchecker\tcheer","length":32,"data":"charger\tchge\tCheer\tchecker\tcheer","previousSibling":null,"parentNode":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","lastChild":null,"baseURI":"http://lively-kernel.org/cgi/send_req.pl?lang=en&hl=en","firstChild":null,"nodeValue":"charger\tchge\tCheer\tchecker\tcheer","textContent":"charger\tchge\tCheer\tchecker\tcheer","nodeType":3,"nodeName":"#text","prefix":null,"childNodes":null,"nextSibling":null,"attributes":null,"ownerDocument":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","namespaceURI":null,"localName":null,"parentElement":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","splitText":null,"replaceWholeText":null,"replaceData":null,"substringData":null,"appendData":null,"deleteData":null,"insertData":null,"addEventListener":null,"appendChild":null,"removeChild":null,"insertBefore":null,"cloneNode":null,"replaceChild":null,"hasChildNodes":null,"hasAttributes":null,"isSupported":null,"isEqualNode":null,"dispatchEvent":null,"isDefaultNamespace":null,"normalize":null,"compareDocumentPosition":null,"removeEventListener":null,"isSameNode":null,"lookupPrefix":null,"lookupNamespaceURI":null,"NOTATION_NODE":12,"CDATA_SECTION_NODE":4,"ELEMENT_NODE":1,"DOCUMENT_POSITION_DISCONNECTED":1,"ENTITY_NODE":6,"TEXT_NODE":3,"ENTITY_REFERENCE_NODE":5,"DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC":32,"DOCUMENT_FRAGMENT_NODE":11,"PROCESSING_INSTRUCTION_NODE":7,"DOCUMENT_POSITION_PRECEDING":2,"DOCUMENT_TYPE_NODE":10,"COMMENT_NODE":8,"DOCUMENT_POSITION_FOLLOWING":4,"ATTRIBUTE_NODE":2,"DOCUMENT_POSITION_CONTAINED_BY":16,"DOCUMENT_NODE":9,"DOCUMENT_POSITION_CONTAINS":8},"js":{"#text":"charger\tchge\tCheer\tchecker\tcheer"},"isJSONConformant":true},{"string":"\t","xml":"{\"XML\":\"charger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}},"isJSONConformant":true},{"string":"","xml":"{\"XML\":\"wrong\\twrung\\twring\\twrongs\\twrongercharger\\tchge\\tCheer\\tchecker\\tcheer\"}","js":{"spellresult":{"c":{"#text":"charger\tchge\tCheer\tchecker\tcheer"}}},"isJSONConformant":true}]]]>
nullfalsenull
nullfalsetruenullfalse
Fabrikfalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalsetrue
originalsourcehttp://weblogs.asp.net/pwelter34/archive/2005/07/19/419838.aspx1
theoriginalwebservicefromgoogle:https://www.google.com/tbproxy/spell?lang=en&hl=enisnotusable,becauseofthebrowsersecuritylimitationsandourproxycannothandlewithHTTPSconnects.Soalittleperlcgiscriptdoesthetrick.1
Usability:Connectormenuisinmywyduringconnecting....null
BUG:PinsinFabrikComponentcannotbeconnectedfromoutside...BUG:XMLcannotbestoredinstring?BUG:PortnewevalcodebacktoFunctioncomponentsBUG:XMLDocumentscannotbepassedthroughpipes3
createLayer("SpellCheckerLayer");//enableLayer(SpellCheckerLayer);//disableLayer(SpellCheckerLayer);MenuMorph.addMethods({addItem:function(item,index){varitem=this.addPseudoMorph(this.checkItem(item));if(!index&&(index!=0)){this.items.push(item);return}if(index>this.items.length||index<0)throwdbgOn(newError('Strangeindex'));varparts=this.items.partition(function(ea,i){returni<index});parts[0].push(item);this.items=parts[0].concat(parts[1]);},});layerClass(SpellCheckerLayer,TextMorph,{correctWithSuggestion:function(proceed,offset,length,suggestion){console.log("correctfrom"+offset+"to"+offset+length+"with:"+suggestion);this.setSelectionRange(offset,offset+length);this.replaceSelectionWith(suggestion);},morphMenu:function(proceed,evt){varspellCheck=this.spellCheckUnderMouse(evt);varmenu=proceed(evt);varself=this;if(menu&&spellCheck&&spellCheck.suggestions){varsuggestions=spellCheck.suggestions;menu.addItem(["-----",function(){}],0);console.log("spellCheck:"+suggestions)suggestions.split('').reverse().each(function(ea){menu.addItem([ea,function(){self.correctWithSuggestion(spellCheck.offset,spellCheck.length,ea)}],0);})}returnmenu},spellCheckUnderMouse:function(proceed,evt){if(!this.textStyle)returnnull;varcharIx=this.charOfPoint(this.localize(evt.mousePoint));varstyle=this.textStyle.valueAt(charIx);//wehavetocomputeit,becauseitchanges.....varmark=this.textStyle.markAt(charIx)return{offset:charIx-mark.offset,length:this.textStyle.runs[mark.runIndex]-1,suggestions:style.spellchecksuggestions};},}) this.items.length || index < 0) throw dbgOn(new Error('Strange index'));\n var parts = this.items.partition(function(ea, i) { return i < index });\n parts[0].push(item);\n this.items = parts[0].concat(parts[1]);\n },\r});\r\rlayerClass(SpellCheckerLayer, TextMorph, {\r\r\tcorrectWithSuggestion: function(proceed, offset, length, suggestion) {\r\t\tconsole.log(\"correct from \" + offset + \" to \" + \r\t\t\toffset + length +\" with: \" + suggestion);\t\t\r\t\tthis.setSelectionRange(offset, offset + length);\n\t\tthis.replaceSelectionWith(suggestion);\t\r\t},\r\r\tmorphMenu: function(proceed, evt) {\r\t\tvar spellCheck = this.spellCheckUnderMouse(evt);\r\t\tvar menu = proceed(evt);\r\t\tvar self = this;\r\t\tif (menu && spellCheck && spellCheck.suggestions) {\r\t\t\tvar suggestions = spellCheck.suggestions;\r\t\t\tmenu.addItem([\"-----\", function(){ }], 0 );\n\t\t\tconsole.log(\"spellCheck: \" + suggestions)\n\t\t\tsuggestions.split('\t').reverse().each(function(ea) {\r\t\t\t\tmenu.addItem([ea, function() { \r\t\t\t\t\tself.correctWithSuggestion(spellCheck.offset, spellCheck.length, ea)\r\t\t\t\t}], 0 );\r\t\t\t})\r\t\t}\r\t\treturn menu\n\t},\r \r\tspellCheckUnderMouse: function(proceed, evt) {\t \n\t\tif (!this.textStyle) return null;\n\t\tvar charIx = this.charOfPoint(this.localize(evt.mousePoint));\r\t\tvar style = this.textStyle.valueAt(charIx);\r\t\t// we have to compute it, because it changes.....\r\t\tvar mark = this.textStyle.markAt(charIx)\r\t\treturn {\r\t\t\toffset: charIx - mark.offset,\r\t\t\tlength: this.textStyle.runs[mark.runIndex] - 1,\r\t\t\tsuggestions: style.spellchecksuggestions\r\t\t};\t\t \n\t},\r\r})"]]>55truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null60