<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;color:#00000;'><div>Well, that was interesting...the secret was the format and {1} construct.<br></div><div><br></div><div>Interesting code:<br></div><div><br></div><div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>scrapeWikiPagesToNewClassFrom: aInteger To: zInteger  pausingBetweenBy: delayInteger<br></div><div>|methodTemplate methodSource wikipage newclassname|<br></div><div><br></div><div>      methodTemplate := 'page ^', $', '{1}' ,$'.<br></div><div><br></div><div>      aInteger to:  zInteger do: [:pageNo |<br></div><div>      newclassname := ('DocletSwiki', pageNo asString) asSymbol.<br></div><div>      wikipage:= ((((  '<a target="_blank" href="http://wiki.squeak.org/squeak/">http://wiki.squeak.org/squeak/</a>', pageNo printString) asUrl retrieveContents contents withSeparatorsCompacted)<br></div><div>                              copyReplaceAll:(160 asCharacter asString) with:(Character space asString))<br></div><div>                                    copyReplaceAll:($' asString) with:(($" asString))).<br></div><div><br></div><div>        methodSource := methodTemplate format:{wikipage}.<br></div><div>        methodSource inspect.<br></div><div><br></div><div>         DocletSwiki subclass: newclassname<br></div><div>            instanceVariableNames: ''<br></div><div>            classVariableNames: ''<br></div><div>            poolDictionaries: ''<br></div><div>            category: 'SeasideDoc-Doclet'.<br></div><div><br></div><div>          (Smalltalk at:newclassname) compile: methodSource.<br></div><div><br></div><div>(Delay forSeconds: delayInteger) wait.]<br></div></blockquote><br></div><div>It worked!</div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div><br></div><div>---- On Fri, 23 Nov 2018 07:56:34 -0500 <b>Joachim Tuchel <jtuchel@objektfabrik.de></b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div><p>Hi Timothy,<br></p><p><br></p><p>I'd start looking for quotes in the html string. Seems parts of the String are not interpreted as String contents. <br></p><p><br></p><p>Is that possible?<br></p><p><br></p><p>Joachim<br></p><div><br></div><p class="x_1379445132default-style"><br></p><div><br></div><div> <br></div><p><br></p><blockquote><div>_______________________________________________ <br></div><div>seaside mailing list <br></div><div><a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a> <br></div><div><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a> <br></div></blockquote><p class="x_1379445132default-style"><br></p><div><br></div><div> <br></div><p><br></p></div><blockquote><div>gettimothy <<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>> hat am 23. November 2018 um 13:51 geschrieben: <br></div><div><br></div><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif"><div><br></div><div>Good morning, <br></div><div><br></div><div>At <a target="_blank" href="http://www.menmachinesmaterials.com/SeasideDoc">http://www.menmachinesmaterials.com/SeasideDoc</a> I am trying to scrape  <a target="_blank" href="http://wiki.squeak.org/squeak/">http://wiki.squeak.org/squeak/</a>  and store the html data in a method of a subclass of DocletSwiki. <br></div><div><br></div><div>I am able to create new subclasses with methods just fine until I try to store the html content in a method. <br></div><div><br></div><div>My latest attempt to just get something to work looks like this: <br></div><div><br></div><blockquote><div><div><br></div><div>|ht createdMethodName | <br></div><div><br></div><div>createdMethodName := #htmlcontent. <br></div><div>ht := HelpTopic <br></div><div>title:'Dude' <br></div><div>contents:(HTTPLoader default retrieveContentsFor: (' <a href="http://wiki.squeak.org/squeak/1" target="_blank">http://wiki.squeak.org/squeak/1</a>' asUrl)). <br></div><div><br></div><div><br></div><div><br></div><div>DocletSwiki compile: createdMethodName, (ht contents content asTextFromHtml). <br></div></div></blockquote><div><br></div><div><br></div><div><br></div><div>that ht contents content asTextFromHtml is the latest contortion after many hours of hacking. <br></div><div><br></div><div>It throws the SyntaxError (?) shown in the subject header above.<br></div><div><br></div><div><br></div><div>A simple  <br></div><blockquote><div>DocletSwiki compile: #htmlcontent, '^ 1' <br></div></blockquote><div>works fine. <br></div><div><br></div><div>DocletSwiki is a simple subclass of WAComponent. <br></div><div><br></div><div>Thanks in advance. <br></div><div><br></div><div>t <br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></blockquote></blockquote></div><div><br></div></div><br></body></html>