How does "ask file with type" work?

Dave dave at looktowindward.com
Thu Apr 5 07:25:14 EDT 2007


Hi,

I have a script with the following ask statement:

   ask file "Enter Name of New Script File" with myScriptFolderPath  
with type "rev"

What is this supposed to do?

This is what I want to happen:

The choose file dialog is displayed.
The user enters a file name with or without an extension (or is  
forced to enter an extension) and the extension appended to file name.
If the file exists they are prompted to replace the current file or not.

At the moment, if the user enters a file without an extension this  
name is passed back. This is ok and it's easy to handle, but it means  
that I will have two different "File Exists, Replace this file?"  
dialogs which is messy and inconsistent.

The alternative is to do my own choose file dialog, but it will be a  
lot of work to replicate the OS Version, especially when running on  
multiple platforms.

Any ideas or suggestions?

All the Best
Dave




More information about the use-livecode mailing list