<!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-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hi Folks.<br></div><div><br></div><div><br></div><div>I am trying to compile:<br></div><div><br></div><div><div>this single string is currently residing in a HelpTopic within a method named 'contents'. Below is copy-n-paste from the inspector.<br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>'<br></div><div>DocOrgToX is a set of Squeak Doc classes used to convert between CustomHelp to Markup and back again.<br></div><div><br></div><div>The DocCustomHelpToOrg and DocOrgToCustomHelp classes convert from CustomHelp to Org and back again.<br></div><div><br></div><div><br></div><div><br></div><div><a target="_blank" href="https://orgmode.org/guide/">https://orgmode.org/guide/</a><br></div><div><br></div><div>MCHttpRepository<br></div><div>    location: ''<a target="_blank" href="http://www.squeaksource.com/Doc">http://www.squeaksource.com/Doc</a>''<br></div><div>    user: ''tty''<br></div><div>    password: ''''<br></div><div><br></div><div><br></div><div>  <br></div><div><br></div><div>'<br></div></blockquote></div><div><br></div><div>I am trying to compile this thing dynamically to create CustomHelp stuff.</div><div><br></div><div><br></div><div><br></div><div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>createSubclass: aHelpTopic<br></div><div><br></div><div>|newclassname methodSourceFoo|<br></div><div>      aHelpTopic inspect.<br></div><div>      newclassname := aHelpTopic key asSymbol.<br></div><div>      [[ (Smalltalk at: newclassname  )                   isNil<br></div><div>            ifFalse:[self inform: 'class ', newclassname, ' exists. delete it first'. ^nil].  "could use an are you sure here."<br></div><div>      ] on: Error do: []] value.<br></div><div><br></div><div>      CustomHelp subclass: newclassname<br></div><div>          instanceVariableNames: ''<br></div><div>          classVariableNames: ''<br></div><div>          poolDictionaries: ''<br></div><div>          category: 'Doc-Help'.<br></div><div><br></div><div><br></div><div>      methodSourceFoo := 'bookName ^', (aHelpTopic title).<br></div><div>      (Smalltalk at: newclassname) class compile: methodSourceFoo       .  < -----WORKS FINE TO HERE.<br></div><div><br></div><div>      aHelpTopic subtopics do:[:ht | |methodsource ios|<br></div><div>            (ht key asLowercase) = (ht key)<br></div><div>                  ifTrue:[<br></div><div>                        ios := ReadStream on: (ht key) , '^HelpTopic title: ' ,  (ht title surroundedBySingleQuotes),  ' contents: ', (ht contents asSmalltalkComment <b>apply</b><b>ContortionsToRemoveBeginningAndEndingDoubleQuotes</b> surroundedBySingleQuotes).<br></div><div>                        methodsource := (ios contents).<br></div><div>                        (Smalltalk at: newclassname) class compile: methodsource.]<br></div><div><br></div><div>].<br></div></blockquote><div><br></div></div><div>but I 'know' there has to be an elegant way to do this besides ."asSmalltalkComment <b>applyContortionsToRemoveBeginningAndEndingDoubleQuotes</b> surroundedBySingleQuotes" which is not working anyway.<br></div><div><br></div><div>Any pointers greatly appreaciated!<br></div><div><br></div><div>thanks in advance.</div></div><br></body></html>