Save Dialog showing current name of file open

Sarah Reichelt sarah.reichelt at gmail.com
Fri Jun 11 19:55:40 EDT 2010


Try something like this:

put the label of this stack into tSuggestedFileName
put ".txt" after tSuggestedFileName
ask file "Save data as:" with tSuggestedFileName
put it into tSaveFileName
if tSaveFileName is empty then
   exit to top
end if
put tDataToSave into URL ("file:" & tSaveFileName)
if the result is not empty then
   answer error "There was a problem saving your data: " & the result
end if

Cheers,
Sarah

Rodeo discussion:
http://rodeoapps.com/rodeo-discuss-among-yourselves


On Fri, Jun 11, 2010 at 10:54 PM, charles61 <cszasz at mac.com> wrote:
>
> I have been able to code the standard save dialog boxes that are in the Rev
> Manual for my project. But I have not been able to code a save dialog box
> that shows the name of a current window open where the user is asked if you
> want to save it with that name. All that I can get is the save dialog with
> Save As: untitled.txt. I looked through the Use/Rev archives and could not
> find any mention of creating such a dialog!
>
> Since my app only permits one document open at a time, a Save Dialog giving
> the name of the current document would be very appropriate as opposed to the
> Standard Dialog of "Don't Save", "Cancel" and "Save". I greatly appreciate
> if someone could show me how to create such a dialog!



More information about the use-livecode mailing list