I'm using the xtra FileXtra3 to save some images that are in CD-ROM when the user clicks on the button, but is not working correctly. I'm learning to use this xtra now and I don't know if my code is correct. I need to open a dialog box Save As, and when the user clicks on save, the program verify if there is space on HD, and after save the image.
on mouseup
fxObj=xtra("FileXtra3".new()
put fxObj.fx_FileSaveAsDialog("c:\","Arte_01.tif","Save As",True)
fxObj=0
if fxObj.fx_FileGetSize("..\images\Arte_01.tif" > fxObj.fx_VolumeGetTotalBytes("c:\"then
--here I need to verify the volume that the user selects
alert("Out of Space!"
else
put fxObj.fx_FileCopy ("..\images\Arte_01.tif","c:\Arte_01.tif"
--here I need to copy the image Arte_01.tif from CD_Rom to
--the folder that the user selects
fxObj=0
end if
end
on mouseup
fxObj=xtra("FileXtra3".new()
put fxObj.fx_FileSaveAsDialog("c:\","Arte_01.tif","Save As",True)
fxObj=0
if fxObj.fx_FileGetSize("..\images\Arte_01.tif" > fxObj.fx_VolumeGetTotalBytes("c:\"then
--here I need to verify the volume that the user selects
alert("Out of Space!"
else
put fxObj.fx_FileCopy ("..\images\Arte_01.tif","c:\Arte_01.tif"
--here I need to copy the image Arte_01.tif from CD_Rom to
--the folder that the user selects
fxObj=0
end if
end