|
|
|
File Save as..
Added on 4/20/2001
|
Updated Chuck's "File save as" behaviour by using the new FileXtra3, as now one has to instantiate the
Xtra before use. The return values from methods are now True/False instead of error codes. Thanks to Kent Kersten, without his xtra this would have not been possible,
and applause to Chuck for providing such beautiful codes.
property filePath, toPath, theName, theTitle, overwrite
on getPropertyDescriptionList me
p_list = [:]
addProp p_list, #filePath, [#format : #string, #default : "files\test.txt", #comment : "Base file-to-save path relative to the movie:"]
addProp p_list, #toPath, [#format : #string, #default : "C:\", #comment : "Path to start from in save dialog:"]
addProp p_list, #theName, [#format : #string, #default : "test.txt", #comment : "Name of file displayed in the dialog box:"]
addProp p_list, #theTitle, [#format : #string, #default : "Save as:", #comment : "Text in the bar on the dialog box:"]
addProp p_list, #overwrite, [#format : #boolean, #default : true, #comment : "Prompt before overwriting existing file (windows only)?:"]
return p_list
end
on mouseUp me
fxObj = new(xtra "FileXtra3")
if the platForm contains "win" then
theFile = fxObj.fx_FileSaveAsDialog(toPath, theName, theTitle, overwrite)
else
theFile = fxObj.fx_FileSaveAsDialog(toPath, theName, theTitle)
end if
fxObj.fx_FileCopy(the moviePath & filePath, theFile)
fxObj = 0
end
|
|