How does "ask file with type" work?

Richard Gaskin ambassador at fourthworld.com
Thu Apr 12 01:15:23 EDT 2007


Trevor DeVore wrote:

> On Apr 6, 2007, at 7:49 AM, Richard Gaskin wrote:
> 
>> If you supply a default name, the name portion preceding the file  
>> name extension is selected, preserving the file type extension.   
>> That works well.
> 
> This works on OS X but not Windows. On Windows the entire file name  
> (including extension) is selected. If the user just starts typing  
> away then the extension is lost. This seems to be the standard  
> behavior with other Windows applications but see below.
> 
...
>> OS X allows the developer to supply a file extension, and Rev  
>> provides a means for doing that.  But apparently the OS doesn't  
>> prevent the user from going out of their way to delete file type  
>> extensions in its dialog, and the "ask file" command (when used  
>> outside of the Message Box) faithfully returns exactly what the  
>> user entered.
> 
> I just tested Notepad and SnagIt on Windows.  The behavior in ask  
> file dialogs is to automatically append the extension of the  
> currently selected "Save as type:". In Notepad I tried to save a file  
> as "test" in a folder that had a "test.txt" file already. I clicked  
> the "Save" button and was immediately presented with a dialog asking  
> if I wanted to replace "test.txt" (ask dialog did not disappear).
> 
> So on Windows I think the file extension of the currently selected  
> "Save as type:" should be automatically appended to the file name. On  
> Mac I think the current behavior is correct since file extensions  
> aren't required.
> 
> The fact that lots of us are writing cross-platform software means  
> some of us might want to enforce file extensions so the files can  
> travel between different operating systems easily enough. Maybe an  
> option to force the extension on OS X would be nice as well. We can  
> do it manually now but it would be nice to not have to add the extra  
> code to check each time.

Those are important observations.  Please consider adding them to the BZ 
report at:
<http://quality.runrev.com/qacenter/show_bug.cgi?id=4612>

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list