TIP #382: LET TK_GETSAVEFILE IGNORE FILE OVERWRITES ===================================================== Version: $Revision: 1.6 $ Author: Pawel Salawa Don Porter State: Final Type: Project Tcl-Version: 8.5.11 Vote: Done Created: Tuesday, 02 November 2010 URL: https://tip.tcl-lang.org382.html Post-History: ------------------------------------------------------------------------- ABSTRACT ========== This document describes new option for *tk_getSaveFile* named *-confirmoverwrite* to control whether a warning dialog is displayed when selecting an existing file for overwriting. RATIONALE =========== There's been numerous requests for support for file dialog that allows to select a file name with no matter if it exists or not. One workaround was to use *ttk::getAppendFile* from , but it used its own file dialog, instead of native one. This TIP makes use of native file dialog. SPECIFICATION =============== The *tk_getSaveFile* will accept a *-confirmoverwrite* option with boolean value as its argument. Default value for this option is "*true*". If value for this option is "*false*", then the dialog won't warn user in case he selects existing file, that he's about to overwrite the file. The option will be supported only for *tk_getSaveFile*, not for *tk_getOpenFile*. A non-boolean value for this option will raise an error. The new option will be recognized and accepted on all platforms. For any platform where the underlying windowing system does not permit the required configuration, the option will have no effect, and the platform dialog will just do what it does. COMPATIBILITY =============== Default value matches existing behavior. REFERENCE IMPLEMENTATION ========================== See the *tip-382* branch. It includes implementations for X, supported Windows, and OSX Carbon. The proposed option will not be implemented for Pre-NT Windows. An implementation for OSX Cocoa may be possible using the approach outlined at [], but no such implementation is yet completed. COPYRIGHT =========== This document has been placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows