Can't add file extension in Windows

Ken Ray kray at sonsothunder.com
Sun Mar 16 16:33:01 EST 2003


Good question... I ran your code below (using "the directory" for
gGraphDefaultFolder) and it worked fine for me. Perhaps it's an OS
issue? What Windows version are you experiencing this on?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com 
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of 
> Howard Bornstein
> Sent: Sunday, March 16, 2003 2:02 PM
> To: use-revolution at lists.runrev.com
> Subject: Can't add file extension in Windows
> 
> 
> I'm running into a baffling problem when trying to export a jpeg file 
> under Windows XP. I explicitly name the file with a ".jpg" 
> extension, but 
> the dot never appears in the filename.
> 
> Here's the code:
> 
>   put the short name of image 1 into imageName
>     
>   put ".jpg" after imagename
>     
>   ask file "Save the chart as..."  with 
> gGraphDefaultFolder&"/"&imagename 
> with filter "JPEG file,*.jpg"
> 
> 
> Let's say that imagename="NewChart". The filename that appears in the 
> directory save box is "NewChartjpg"
> 
> However, if I put this statement directly following the Ask File 
> statement:
> 
>     put gGraphDefaultFolder&"/"&imagename
> 
> It prints out "<directorypath>/NewChart.jpg"
> 
> Why is the period being deleted from the filename in the Save 
> dialog box? 
> This works fine under the Mac OS, btw.
> 
> ***New test***
> 
> OK, this is good. It turns out that if I add a period at the 
> end of the 
> filename (e.g. "NewChart.jpg." then the filename appears 
> correctly in the 
> Save dialog box ("NewChart.jpg"). The final period is dropped and the 
> extension shows up correctly. On the Mac, the extra dot does 
> appear. So, 
> I can code around this, but my intuition is that this should work the 
> same across platforms. Anyone have an idea what is going on?
> 
> Thanks,
> 
> Howard Bornstein
> ____________________
> D E S I G N  E Q
> www.designeq.com _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the use-livecode mailing list