Karl Ramberg uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-kfr.70.mcz==================== Summary ====================
Name: HelpSystem-Core-kfr.70
Author: kfr
Time: 22 April 2015, 9:56:55.666 pm
UUID: 8cbb4c20-fccf-d648-85f7-38c82ecab44f
Ancestors: HelpSystem-Core-kfr.69
Notify about current limitation in accepting edits in HelpBrowser
=============== Diff against HelpSystem-Core-kfr.69 ===============
Item was changed:
----- Method: HelpBrowser>>accept: (in category 'actions') -----
accept: text
"Accept edited text. Compile it into a HelpTopic"
| code topicClass topicMethod |
+ true ifTrue:[^self inform: 'Not implemented yet.', String cr, 'Make new help pages in the browser for the time being'].
(self find: self topic contents) asArray ifNotEmpty: [:refs |
topicClass := refs first actualClass theNonMetaClass.
topicMethod := refs first selector].
code := String streamContents:[:s|
s nextPutAll: topicMethod.
s crtab; nextPutAll: '"This method was automatically generated. Edit it using:"'.
s crtab; nextPutAll: '"', self name,' edit: ', topicMethod storeString,'"'.
s crtab; nextPutAll: '^HelpTopic'.
s crtab: 2; nextPutAll: 'title: ', currentTopic title storeString.
s crtab: 2; nextPutAll: 'contents: '.
s cr; nextPutAll: (String streamContents:[:c| c nextChunkPutWithStyle: text]) storeString.
s nextPutAll:' readStream nextChunkText'.
].
topicClass class
compile: code
classified: ((topicClass class organization categoryOfElement: topicMethod) ifNil:['pages']).
self flag: #fixme. "mt: Update will not work because the topic builder eagerly cached all the contents and lost track of its origins. We need to get rid of the topic builders and create topic contents lazily resp. live."
self changed: #toplevelTopics..
self changed: #currentTopic.
self changed: #topicContents.
!