A save question in an app

Charles Szasz cszasz at mac.com
Wed Jun 29 19:31:56 EDT 2011


I have the following code in my save handler:


if there is not a folder tNewFolder then
               create folder tNewFolder
            end if
            
            ask file "Save file as: " with (tNewFolder & "/Untitled.datatxt")
            put it into tSaveFile
            if tSaveFile is empty then exit to top
            put gatherData(tCardName) into URL ("file:" & tSaveFile)
         end if

When an user saves a file, the user is presented with a file dialog that has "Untitled.datatxt" hilited in the Save As dialog. Is there anyway that only Untitled can be hilited so that the user enters a name for the file but the .datatxt extension is automatically saved to the file name selected by the user?

Charles Szasz
cszasz at mac.com







More information about the use-livecode mailing list