Problem saving files
David C.
davidocoker at gmail.com
Tue Jul 6 11:56:47 EDT 2010
On Tue, Jul 6, 2010 at 10:49 AM, David C. <davidocoker at gmail.com> wrote:
>> I just ran a test and was unable to reproduce the prompt:
>>
>> I used "ask file whatever", and in the OS putfile dialog I typed the name of
>> an existing file but without the extension. The dialog did not prompt that
>> this was a duplicate name. I also tried a different extension, with the
>> same result.
>>
>> The only time I could get the OS dialog to report that the file name was the
>> same as an existing file was when I included the file extension matching the
>> existing file.
>>
>> This is consistent with Rev's behavior too, since it will only overwrite the
>> file if the complete name of the file is an exact match of an existing one.
>>
>> Do you have a recipe for getting the OS dialog to report a duplicate name
>> when the extension is different? Which OS are you using?
>>
>> --
>> Richard Gaskin
>
> Hi Richard,
> I'm using the code exactly as was shown in my original post, with the
> exception of the actual filename and extension which I made more
> generic for the sake of example. Here is the code again as well:
>
> on SaveTheFile
> ask file "Save project as:" with filter "MYFL file,*.myfl"
> if it <> "" then
> put it into tfile
> put fld "save list" into tFiletoSave
> put tFileToSave into url ("file:" & tfile & ".myfl")
> else
> exit to top
> end if
> end SaveTheFile
>
> I'm running Windows 7 Home Premium with admin privileges and the UAC turned on.
>
> Best regards,
> David C.
>
Richard,
After reading your message again I realized that just typing in the
filename of an existing file *does not* create the prompt as you
described *and* does overwrite the file without duplicating the
extension. However, if I select the file using the mouse, I then get
the prompt with the file duplication and doubled up extension.
Sorry for not paying closer attention to your message.
Best regards,
David C.
More information about the use-livecode
mailing list