Can't add file extension in Windows
Howard Bornstein
bornstein at designeq.com
Sun Mar 16 10:05:01 EST 2003
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
More information about the use-livecode
mailing list