The Trunk: Monticello-eem.676.mcz

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

The Trunk: Monticello-eem.676.mcz

Eliot Miranda uploaded a new version of Monticello to project The Trunk:

==================== Summary ====================

Name: Monticello-eem.676
Author: eem
Time: 30 December 2017, 4:32:11.407169 pm
UUID: a6398319-1b03-45b6-9531-2a17639c9334
Ancestors: Monticello-tpr.675

Add missing guard to catch cancelling new file dialog.

=============== Diff against Monticello-tpr.675 ===============

Item was changed:
  ----- Method: MCCodeTool>>fileOutMessage (in category 'menus') -----
  "Put a description of the selected message on a file"
  | fileName |
  self selectedMessageName ifNotNil:
  [Cursor write showWhile:
  [self selectedClassOrMetaClass fileOutMethod: self selectedMessageName].
  items isEmpty ifTrue:
  fileName := UIManager default saveFilenameRequest: 'File out on which file?' initialAnswer: 'methods'.
+ fileName isEmptyOrNil ifTrue: [^self].
  Cursor write showWhile:
  [| definitionStream removalInitStream |
  definitionStream := WriteStream on: (String new: 1000).
  removalInitStream := WriteStream on: (String new: 100).
  definitionStream header; timeStamp.
  items do:
  [:patchOp| | def |
  def := patchOp definition.
  def isMethodDefinition ifTrue:
  [(def actualClass notNil
   and: [def actualClass includesSelector: def selector])
  [def actualClass
  printMethodChunk: def selector
  withPreamble: true
  on: definitionStream
  moveSource: false
  toFile: nil.
  (def selector == #initialize and: [def classIsMeta]) ifTrue:
  [removalInitStream nextChunkPut: def className, ' initialize'; cr]]
  [removalInitStream nextChunkPut: def className, (def classIsMeta ifTrue: [' class'] ifFalse: ['']), ' removeSelector: ', def selector printString; cr]].
  def isClassDefinition ifTrue:
  [def actualClass
  [definitionStream nextChunkPut: def actualClass definition.
  def comment ifNotNil:
  [def actualClass organization
  putCommentOnFile: definitionStream
  numbered: 1
  moveSource: false
  forClass: def actualClass]]
  [removalInitStream nextChunkPut: def className, ' removeFromSystem'; cr]]].
  definitionStream nextPutAll: removalInitStream contents.
  FileStream writeSourceCodeFrom: definitionStream baseName: fileName isSt: true useHtml: false]!