[squeak-dev] request help compiling a method for a HelpTopic. answer is: printAsLiteralOn:

gettimothy gettimothy at zoho.com
Sun Sep 12 09:29:57 UTC 2021


aHelpTopic subtopics do:[:ht | |methodsource method title content |

      (ht key asLowercase) = (ht key)

            ifTrue:[

                  method := ht key  .

                  title :=  ht title surroundedBySingleQuotes.

                  content :=  (String streamContents:	[ : stream |	 (ht contents) printAsLiteralOn: stream]).

                  Transcript show: content; cr.

                  methodsource := methodTemplate format: (Array with: method with: title  with: content ).

                  (Smalltalk at: newclassname) class compile: methodsource.

]].




finally got it to compile.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210912/00745d1a/attachment.html>


More information about the Squeak-dev mailing list