# HG changeset patch # User Claus Gittinger # Date 1314002199 -7200 # Node ID 8f5778095338c7cbb05c20fcc89990d1071ba0d2 # Parent 955a5d0c2d264a8b1780a0799d4308587faed53c changed: #doSave oops - excla in labels did not work diff -r 955a5d0c2d26 -r 8f5778095338 MenuEditor.st --- a/MenuEditor.st Fri Aug 19 09:44:25 2011 +0200 +++ b/MenuEditor.st Mon Aug 22 10:36:39 2011 +0200 @@ -2736,7 +2736,7 @@ class: specClass selector: specSelector " - |cls specCode mthd category code excla| + |cls specCode mthd category code excla s| self isEditingSpecOnly ifTrue:[ savedSpec := self generateMenuSpec. @@ -2758,29 +2758,33 @@ category := mthd category. ]. - excla := Character excla asString. - - code := excla - , (cls name , ' class methodsFor:' , category storeString) - , excla , '\\' - - , specSelector , '\' - , (self class codeGenerationComment replChar:$!! withString:'!!!!') - , '\\ "\' - , (' MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\') - , (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') - , ' "\'. - - code := code - , '\' - , ' \\' - , ' ^ ' , specCode - , '\' - , (excla , ' ' , excla) - , '\\'. - - code := code withCRs. - (ReadStream on:code) fileIn. + s := '' writeStream. + + s nextPutChunkSeparator; + nextPutAll:(cls name); + nextPutAll:' class methodsFor:'; + nextPutAll:category storeString; + nextPutChunkSeparator; + cr; cr; + nextPutAll:specSelector; + cr; + nextPutAllAsChunk:(self class codeGenerationComment) withCRs; + cr; cr; + nextPutLine:' "'; + nextPutLine:(' MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector); + nextPutLine:(' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp'); + nextPutLine:' "'; + cr; + nextPutLine:' '; + cr; + nextPutAll:' ^ '; + nextChunkPut:specCode; + space; + nextPutChunkSeparator; + cr. + +self halt. + (ReadStream on:s contents) fileIn. self isStandAlone ifTrue:[ self helpTool doSave @@ -2789,6 +2793,8 @@ self updateHistory. hasSaved := true. self clearModified. + + "Modified: / 22-08-2011 / 10:28:17 / cg" ! doSaveAs