STATIC FUNCTION SaveFile ( ) AS BooleanCalls the file standard dialog to get the name of a file to save.
Returns TRUE if the user clicked on the Cancel button, and FALSE if the user clicked on the OK button.
This example shows how you can save the content of a /comp/gb.qt.kde/textarea to a file selected by the user. If the user cancels the dialog the file is not saved.
PUBLIC SUB ButtonSave_Click() Dialog.Filter = ["*.txt", "Text Files"] IF Dialog.SaveFile() THEN RETURN File.Save(Dialog.Path, TextAreaEdit.Text) CATCH Message.Info(Error.Text) END