[FIX] Cancelling 'save as...' fix, plus enhancement

Doug Way dway at mat.net
Tue May 4 04:29:42 UTC 1999


This change set fixes a bug in which cancelling an image "save as..." 
operation from the main menu causes a "zero length filename" error.  This
bug appears to have been around since at least 2.0, if not longer. 

Hitting the Cancel button on the Morphic FillInTheBlank dialog for "save
as..." will now simply cancel the save.  Deleting the entire string and
accepting will also have the effect of cancelling the save, for both
Morphic and MVC.  (Which makes sense, because hitting Cancel on a
FillInTheBlank returns an empty string.)

An additional enhancement is also included, which changes the default
image name in the 'save as...' FillInTheBlank from 'NewImageName' to the
actual current name of the image.  This is a standard UI convention for
Save As dialogs, with good reason... I often want to make a slight
modification to the name of the image I'm saving, so I'd rather not have
to type the whole thing in again.  Sometimes I don't even remember the
current name for the image (especially in full-screen mode), so including
it in this dialog helps.  Also, 'NewImageName' is a redundant hint in the
Morphic FillInTheBlank, since the title already says 'New File Name?'

Both of these changes are in a single method, SystemDictionary>>saveAs.
The changeset is at:

http://www.mindspring.com/~dway/smalltalk/SaveAsFixes-dew.cs

- Doug Way
  EAI/Transom Technogies, Ann Arbor, MI
  dway at eai.com, dway at mat.net
  http://www.transom.com

  Smalltalk: Guaranteed Y2T Compliant





More information about the Squeak-dev mailing list