The Trunk: ToolBuilder-Morphic-cmm.212.mcz

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

The Trunk: ToolBuilder-Morphic-cmm.212.mcz

commits-2
Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.212.mcz

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

Name: ToolBuilder-Morphic-cmm.212
Author: cmm
Time: 7 April 2018, 7:19:41.653494 pm
UUID: 66f83f51-b978-4030-be9c-fce2ca2491f0
Ancestors: ToolBuilder-Morphic-cmm.211

Fix minor code inelegance.

=============== Diff against ToolBuilder-Morphic-cmm.211 ===============

Item was changed:
  ----- Method: FileSaverDialog>>selectFilename: (in category 'filename') -----
  selectFilename: aText
  "The user has entered a potential filename in the text field.  Check it against the current pattern; if it is ok we can accept it and then if it is a file in the current list, highlight it.  If it would not match the pattern, alert the user."
  fileName := aText asString.
  ^ self selectExistingFilename
  ifTrue:
  [ self changed: #fileListIndex.
  true ]
  ifFalse:
  [ suffixList size = 1
  ifTrue:
  [ | suffix |
  ((suffix := '.' , suffixList anyOne)
  compare: (fileName last: suffix size)
+ caseSensitive: FileDirectory default isCaseSensitive) = 2 ifFalse: [ fileName := fileName , suffix ].
- caseSensitive: FileDirectory default isCaseSensitive) = 2 ifFalse: [ fileName := fileName , '.' , suffixList first ].
  true ]
  ifFalse:
  [ suffixList
  at:
  (UIManager default
  chooseFrom: suffixList
  title: 'Please choose the type of file to save.')
  ifPresent:
  [ : choice | fileName := fileName , '.' , choice.
  true ]
  ifAbsent:
  [ suffixList isEmpty or:
  [ UIManager default inform: 'WARNING:  File not saved!!  A filename matching one of ' , patternList asArray asString , ' patterns is required.'.
  false ] ] ] ]!