head	1.26;
access;
symbols
	core-8-5-9:1.23.2.1
	core-8-5-8:1.23.2.1
	macosx-cocoa-merge:1.25
	macosx-cocoa-premerge:1.25
	macosx-carbon-freeze:1.25
	core-8-5-7:1.23
	core-8-5-6:1.23
	core-8-6-b1:1.25
	core-8-6-a3:1.25
	core-8-5-5:1.23
	core-8-6-a2:1.24
	core-8-5-4:1.23
	core-8-5-3:1.23
	core-8-6-a1:1.23
	core-8-4-19:1.10.2.2
	core-8-5-branch:1.23.0.2
	core-8-5-2:1.23
	core-8-4-18:1.10.2.2
	core-8-5-1:1.23
	core-8-4-17:1.10.2.2
	core-8-5-0:1.23
	core-8-5-b3:1.22
	core-8-5-b2:1.19
	core-8-4-16:1.10.2.2
	core-8-5-b1:1.15
	core-stablilizer-merge:1.15
	core-stabilizer-branch:1.15.0.2
	core-stabilizer-merge:1.23
	core-8-4-15:1.10.2.2
	core-8-5-a6:1.15
	core-8-5-a5:1.15
	core-8-4-14:1.10.2.2
	core-8-5-a4:1.15
	core-8-4-13:1.10.2.2
	core-8-4-12:1.10.2.2
	core-8-4-11:1.10.2.1
	core-8-5-a3:1.14
	core-8-4-10:1.10.2.1
	core-8-4-9-branch:1.10.2.1.0.2
	core-8-5-a2:1.13
	core-8-4-9:1.10.2.1
	core-8-4-8:1.10.2.1
	core-8-4-7:1.10
	core-8-5-a1:1.10
	core-8-4-6:1.10
	core-8-4-5:1.10
	mistachkin-dev-branch:1.10.0.4
	core-8-4-4:1.10
	core-8-4-3:1.10
	core-8-4-branch:1.10.0.2
	core-8-4-2:1.10
	core-8-4-1:1.10
	core-8-3-5:1.6.2.2
	core-8-4-0:1.10
	macosx-8-4-merge-2002-08-31-trunk:1.10
	macosx-8-4-premerge-2002-08-31-branch:1.8.6.2
	macosx-8-4-premerge-2002-08-31-trunk:1.10
	macosx-8-4-merge-2002-08-30-branch:1.8.6.2
	macosx-8-4-merge-2002-08-30-trunk:1.10
	macosx-8-4-merge-2002-08-20-branch:1.8.6.2
	macosx-8-4-merge-2002-08-20-trunk:1.10
	core-8-4-b2:1.10
	core-8-4-b1:1.10
	macosx-premerge-6-9-02:1.8.6.1
	core-8-4-a4:1.9
	core-8-3-4:1.6.2.2
	macosx-8-4-branch:1.8.0.6
	macosx-8-4-branchpoint:1.8
	core-8-4-a3:1.8
	core-8-3-3:1.6.2.1
	dgp-privates-into-namespace:1.8.0.4
	tclpro-1-5-0:1.6
	core-8-4-win-speedup:1.8.0.2
	core-8-4-a2:1.8
	tclpro-1-4-1:1.6
	tclpro-1-4-0:1.6
	core-8-3-2:1.6
	ajuba-ajuba2-2-1-base:1.6
	ajuba-ajuba2-2-0:1.6
	core-8-4-a1:1.6
	core-8-3-1-branch:1.6.0.2
	core-8-3-1:1.6
	scriptics-sc-2-0-b5:1.5
	scriptics-sc-2-0-fixed:1.5
	scriptics-sc-2-0-b2:1.5
	scriptics-sc-2-0-b1:1.5
	core-8-3-0:1.5
	core-8-3-b2:1.4
	core-8-3-b1:1.4
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	core-8-2-3:1.3
	scriptics-sc-1-1-branch:1.3.0.16
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.14
	scriptics-sc-1-0-base:1.3
	core-8-2-2:1.3
	core-8-2-1:1.3
	scriptics-bc-1-0-b1:1.3
	core-8-2-1-branch:1.3.0.12
	scriptics-tclpro-1-3-0:1.3
	core-8-2-0:1.3
	core-8-2-b3-branch:1.3.0.10
	core-8-2-b3-base:1.3
	scriptics-tclpro-1-3-b4:1.3
	core-8-2-b2:1.3
	scriptics-tclpro-1-3-b3:1.3
	core-8-2-b1:1.3
	scriptics-tclpro-1-3-b2:1.3
	merge-to-mainline-5/21/99:1.3
	scriptics-tclpro-1-3-b2-branch:1.3.0.8
	core-8-1-1:1.3
	scriptics-tclpro-1-3-b1:1.3
	core-8-1-1-base:1.3
	core-8-1-0:1.3
	merge-to-mainline-4-29-99:1.3
	merge-to-mainline-4-23-99:1.3
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.3.0.6
	core-8-0-6-base:1.3
	core-8-0-5:1.3
	core-8-1-b3:1.1.4.1
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.3.0.4
	scriptics-tclpro-1-2:1.3
	scriptics-tclpro-1-2-b2:1.3
	core-8-1-merge-2/10/99:1.3
	core-8-0-5-branch:1.3.0.2
	core-8-0-5-base:1.3
	scriptics-tclpro-1-2-b1:1.3
	scriptics-tclpro-1-2-a1:1.3
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.3
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.3;
locks; strict;
comment	@# @;


1.26
date	2009.10.22.10.12.57;	author dkf;	state Exp;
branches;
next	1.25;

1.25
date	2008.09.23.13.36.40;	author dkf;	state Exp;
branches;
next	1.24;

1.24
date	2008.06.30.22.57.02;	author dkf;	state Exp;
branches;
next	1.23;

1.23
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches
	1.23.2.1;
next	1.22;

1.22
date	2007.11.04.10.37.50;	author das;	state Exp;
branches;
next	1.21;

1.21
date	2007.10.30.21.29.59;	author dkf;	state Exp;
branches;
next	1.20;

1.20
date	2007.10.29.16.04.13;	author dkf;	state Exp;
branches;
next	1.19;

1.19
date	2007.10.26.20.25.05;	author dgp;	state Exp;
branches;
next	1.18;

1.18
date	2007.10.26.20.13.23;	author dgp;	state Exp;
branches;
next	1.17;

1.17
date	2007.10.25.21.44.22;	author hobbs;	state Exp;
branches;
next	1.16;

1.16
date	2007.10.23.15.44.35;	author dkf;	state Exp;
branches;
next	1.15;

1.15
date	2005.07.06.22.17.06;	author hobbs;	state Exp;
branches
	1.15.2.1;
next	1.14;

1.14
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches;
next	1.13;

1.13
date	2004.09.19.16.05.37;	author dkf;	state Exp;
branches;
next	1.12;

1.12
date	2004.08.20.10.56.36;	author dkf;	state Exp;
branches;
next	1.11;

1.11
date	2004.03.25.12.12.36;	author vincentdarley;	state Exp;
branches;
next	1.10;

1.10
date	2002.04.19.22.16.02;	author jenglish;	state Exp;
branches
	1.10.2.1;
next	1.9;

1.9
date	2001.12.14.14.56.46;	author dkf;	state Exp;
branches;
next	1.8;

1.8
date	2000.07.25.21.14.35;	author jenglish;	state Exp;
branches
	1.8.2.1
	1.8.6.1;
next	1.7;

1.7
date	2000.06.23.00.22.28;	author ericm;	state Exp;
branches;
next	1.6;

1.6
date	2000.04.23.03.47.13;	author jingham;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2000.01.27.00.23.10;	author ericm;	state Exp;
branches;
next	1.4;

1.4
date	99.12.16.21.57.11;	author hobbs;	state Exp;
branches;
next	1.3;

1.3
date	98.09.14.18.22.56;	author stanton;	state Exp;
branches;
next	1.2;

1.2
date	98.06.03.15.38.19;	author surles;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.39.52;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.16.18;	author stanton;	state Exp;
branches;
next	;

1.6.2.1
date	2001.04.04.07.23.48;	author hobbs;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	2001.09.15.04.37.33;	author dgp;	state Exp;
branches;
next	;

1.8.2.1
date	2002.04.02.20.57.53;	author hobbs;	state Exp;
branches;
next	;

1.8.6.1
date	2002.02.05.02.25.14;	author wolfsuit;	state Exp;
branches;
next	1.8.6.2;

1.8.6.2
date	2002.06.10.05.38.23;	author wolfsuit;	state Exp;
branches;
next	;

1.10.2.1
date	2004.10.28.10.19.29;	author dkf;	state Exp;
branches;
next	1.10.2.2;

1.10.2.2
date	2005.07.06.22.15.15;	author hobbs;	state Exp;
branches;
next	;

1.15.2.1
date	2007.10.24.12.59.30;	author dgp;	state Exp;
branches;
next	1.15.2.2;

1.15.2.2
date	2007.10.27.04.23.14;	author dgp;	state Exp;
branches;
next	1.15.2.3;

1.15.2.3
date	2007.11.01.16.37.14;	author dgp;	state Exp;
branches;
next	1.15.2.4;

1.15.2.4
date	2007.11.05.14.24.16;	author dgp;	state Exp;
branches;
next	;

1.23.2.1
date	2009.10.22.10.27.58;	author dkf;	state Exp;
branches;
next	;


desc
@@


1.26
log
@Deal with [Patch 2168768], so making the -typevariable option work consistently
with global variables (the only way it *can* work...)
@
text
@'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.25 2008/09/23 13:36:40 dkf Exp $
'\" 
.so man.macros
.TH tk_getOpenFile n 4.2 Tk "Tk Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
tk_getOpenFile, tk_getSaveFile \- pop up a dialog box for the user to select a file to open or save.
.SH SYNOPSIS
.nf
\fBtk_getOpenFile \fR?\fIoption value ...\fR?
\fBtk_getSaveFile \fR?\fIoption value ...\fR?
.fi
.BE
.SH DESCRIPTION
.PP
The procedures \fBtk_getOpenFile\fR and \fBtk_getSaveFile\fR pop up a
dialog box for the user to select a file to open or save. The
\fBtk_getOpenFile\fR command is usually associated with the \fBOpen\fR
command in the \fBFile\fR menu. Its purpose is for the user to select an
existing file \fIonly\fR. If the user enters a non-existent file, the
dialog box gives the user an error prompt and requires the user to give
an alternative selection. If an application allows the user to create
new files, it should do so by providing a separate \fBNew\fR menu command.
.PP
The \fBtk_getSaveFile\fR command is usually associated with the \fBSave
as\fR command in the \fBFile\fR menu. If the user enters a file that
already exists, the dialog box prompts the user for confirmation
whether the existing file should be overwritten or not.
.PP
The following \fIoption\-value\fR pairs are possible as command line
arguments to these two commands:
.TP
\fB\-defaultextension\fR \fIextension\fR
.
Specifies a string that will be appended to the filename if the user
enters a filename without an extension. The default value is the empty
string, which means no extension will be appended to the filename in
any case. This option is ignored on Mac OS X, which
does not require extensions to filenames,
and the UNIX implementation guesses reasonable values for this from
the \fB\-filetypes\fR option when this is not supplied.
.TP
\fB\-filetypes\fR \fIfilePatternList\fR
.
If a \fBFile types\fR listbox exists in the file dialog on the particular
platform, this option gives the \fIfiletype\fRs in this listbox. When
the user choose a filetype in the listbox, only the files of that type
are listed. If this option is unspecified, or if it is set to the
empty list, or if the \fBFile types\fR listbox is not supported by the
particular platform then all files are listed regardless of their
types. See the section \fBSPECIFYING FILE PATTERNS\fR below for a
discussion on the contents of \fIfilePatternList\fR.
.TP
\fB\-initialdir\fR \fIdirectory\fR
.
Specifies that the files in \fIdirectory\fR should be displayed
when the dialog pops up. If this parameter is not specified, then
the files in the current working directory are displayed. If the
parameter specifies a relative path, the return value will convert the
relative path to an absolute path.
.TP
\fB\-initialfile\fR \fIfilename\fR
.
Specifies a filename to be displayed in the dialog when it pops up.
.TP
\fB\-message\fR \fIstring\fR
.
Specifies a message to include in the client area of the dialog.
This is only available on Mac OS X.
.TP
\fB\-multiple\fR \fIboolean\fR
.
Allows the user to choose multiple files from the Open dialog.
.TP
\fB\-parent\fR \fIwindow\fR
.
Makes \fIwindow\fR the logical parent of the file dialog. The file
dialog is displayed on top of its parent window. On Mac OS X, this
turns the file dialog into a sheet attached to the parent window.
.TP
\fB\-title\fR \fItitleString\fR
.
Specifies a string to display as the title of the dialog box. If this
option is not specified, then a default title is displayed. 
.TP
\fB\-typevariable\fR \fIvariableName\fR
.
The global variable \fIvariableName\fR is used to preselect which filter is
used from \fIfilterList\fR when the dialog box is opened and is
updated when the dialog box is closed, to the last selected
filter. The variable is read once at the beginning to select the
appropriate filter. If the variable does not exist, or its value does
not match any filter typename, or is empty (\fB{}\fR), the dialog box
will revert to the default behavior of selecting the first filter in
the list. If the dialog is canceled, the variable is not modified.
.PP
If the user selects a file, both \fBtk_getOpenFile\fR and
\fBtk_getSaveFile\fR return the full pathname of this file. If the
user cancels the operation, both commands return the empty string.
.SH "SPECIFYING FILE PATTERNS"
.PP
The \fIfilePatternList\fR value given by the \fB\-filetypes\fR option
is a list of file patterns. Each file pattern is a list of the
form
.CS
\fItypeName\fR {\fIextension\fR ?\fIextension ...\fR?} ?{\fImacType\fR ?\fImacType ...\fR?}?
.CE
\fItypeName\fR is the name of the file type described by this
file pattern and is the text string that appears in the \fBFile types\fR
listbox. \fIextension\fR is a file extension for this file pattern.
\fImacType\fR is a four-character Macintosh file type. The list of
\fImacType\fRs is optional and may be omitted for applications that do
not need to execute on the Macintosh platform.
.PP
Several file patterns may have the same \fItypeName,\fR in which case
they refer to the same file type and share the same entry in the
listbox. When the user selects an entry in the listbox, all the files
that match at least one of the file patterns corresponding
to that entry are listed. Usually, each file pattern corresponds to a
distinct type of file. The use of more than one file pattern for one
type of file is only necessary on the Macintosh platform.
.PP
On the Macintosh platform, a file matches a file pattern if its
name matches at least one of the \fIextension\fR(s) AND it
belongs to at least one of the \fImacType\fR(s) of the
file pattern. For example, the \fBC Source Files\fR file pattern in the
sample code matches with files that have a \fB\.c\fR extension AND
belong to the \fImacType\fR \fBTEXT\fR. To use the OR rule instead,
you can use two file patterns, one with the \fIextensions\fR only and
the other with the \fImacType\fR only. The \fBGIF Files\fR file type
in the sample code matches files that \fIeither\fR have a \fB\.gif\fR
extension OR belong to the \fImacType\fR \fBGIFF\fR.
.PP
On the Unix and Windows platforms, a file matches a file pattern
if its name matches at least one of the \fIextension\fR(s) of
the file pattern. The \fImacType\fRs are ignored.
.SH "SPECIFYING EXTENSIONS"
.PP
On the Unix and Macintosh platforms, extensions are matched using
glob-style pattern matching. On the Windows platform, extensions are
matched by the underlying operating system. The types of possible
extensions are:
.IP (1)
the special extension
.QW *
matches any file;
.IP (2)
the special extension
.MT
matches any files that do not have an extension (i.e., the filename
contains no full stop character);
.IP (3)
any character string that does not contain any wild card characters (*
and ?).
.PP
Due to the different pattern matching rules on the various platforms,
to ensure portability, wild card characters are not allowed in the
extensions, except as in the special extension
.QW * .
Extensions without a full stop character (e.g.
.QW ~ )
are allowed but may not work on all platforms.
.SH EXAMPLE
.PP
.CS
set types {
    {{Text Files}       {.txt}        }
    {{TCL Scripts}      {.tcl}        }
    {{C Source Files}   {.c}      TEXT}
    {{GIF Files}        {.gif}        }
    {{GIF Files}        {}        GIFF}
    {{All Files}        *             }
}
set filename [tk_getOpenFile \-filetypes $types]

if {$filename != ""} {
    # Open the file ...
}
.CE
.SH "SEE ALSO"
tk_chooseDirectory
.SH KEYWORDS
file selection dialog
'\" Local Variables:
'\" mode: nroff
'\" End:
@


1.25
log
@Fix [Bug 2118116]
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.24 2008/06/30 22:57:02 dkf Exp $
d41 1
d51 1
d62 1
d70 1
d74 1
d79 1
d83 1
d89 1
d94 2
a95 1
The variable \fIvariableName\fR is used to preselect which filter is
@


1.24
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@a0 1
'\" -*- nroff -*-
d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.23 2007/12/13 15:23:43 dgp Exp $
d182 3
@


1.23
log
@merge stable branch onto HEAD
@
text
@d1 1
d8 1
a8 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.15.2.4 2007/11/05 14:24:16 dgp Exp $
d163 1
@


1.23.2.1
log
@Deal with [Patch 2168768], so making the -typevariable option work consistently
with global variables (the only way it *can* work...)
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.23 2007/12/13 15:23:43 dgp Exp $
d86 1
a86 1
The global variable \fIvariableName\fR is used to preselect which filter is
@


1.22
log
@	* doc/chooseDirectory.n:	remove/correct obsolete Mac OS 9-era
	* doc/getOpenFile.n:		information.
	* doc/menu.n:
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.21 2007/10/30 21:29:59 dkf Exp $
@


1.21
log
@More documentation improvements
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.20 2007/10/29 16:04:13 dkf Exp $
d44 1
a44 1
any case. This option is ignored on the Macintosh platform, which
d64 1
a64 4
relative path to an absolute path.  This option may not always work on
the Macintosh.  This is not a bug. Rather, the \fIGeneral Controls\fR
control panel on the Mac allows the end user to override the
application default directory.
d67 1
a67 2
Specifies a filename to be displayed in the dialog when it pops up.  This
option is ignored on the Macintosh platform.
d71 1
a71 2
This is only available on the Macintosh, and only when Navigation
Services are installed.
a74 2
On the Macintosh, this is only available when Navigation Services are
installed.
d78 2
a79 1
dialog is displayed on top of its parent window.
d118 2
a119 2
distinct type of file. The use of more than one file patterns for one
type of file is necessary on the Macintosh platform only.
d138 1
a138 1
glob-style pattern matching. On the Windows platforms, extensions are
@


1.20
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.19 2007/10/26 20:25:05 dgp Exp $
d16 1
a17 1
.br
d19 1
d73 5
a82 5
\fB\-message\fR \fIstring\fR
Specifies a message to include in the client area of the dialog.
This is only available on the Macintosh, and only when Navigation
Services are installed.
.TP
@


1.19
log
@restore baby
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.17 2007/10/25 21:44:22 hobbs Exp $
a19 1

d95 1
a95 1
appropriate filter. If the variable does not exist, or it's value does
d104 1
a104 1

d134 1
a134 1
in the sample code matches files that EITHER have a \fB\.gif\fR
d145 13
a157 5
extensions are: (1) the special extension * matches any
file; (2) the special extension "" matches any files that
do not have an extension (i.e., the filename contains no full stop
character); (3) any character string that does not contain any wild
card characters (* and ?).
d161 5
a165 4
extensions, except as in the special extension *. Extensions
without a full stop character (e.g. ~) are allowed but may not
work on all platforms.

d176 1
a176 1
set filename [tk_getOpenFile -filetypes $types]
a181 1

a183 1

@


1.18
log
@        * doc/*.1:              Revert doc changes that broke
        * doc/*.3:              `make html` so we can get the release
        * doc/*.n:              out the door.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.15 2005/07/06 22:17:06 hobbs Exp $
d90 10
@


1.17
log
@	* doc/getOpenFile.n:  TIP#242 implementation of -typevariable to
	* library/tkfbox.tcl: return type of selected file in file dialogs.
	* library/xmfbox.tcl: [Bug #1156388]
	* macosx/tkMacOSXDialog.c:
	* tests/filebox.test:
	* tests/winDialog.test:
	* win/tkWinDialog.c:
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.16 2007/10/23 15:44:35 dkf Exp $
a15 1
.nf
d17 1
a18 1
.fi
a89 10
.TP
\fB\-typevariable\fR \fIvariableName\fR
The variable \fIvariableName\fR is used to preselect which filter is
used from \fIfilterList\fR when the dialog box is opened and is
updated when the dialog box is closed, to the last selected
filter. The variable is read once at the beginning to select the
appropriate filter. If the variable does not exist, or it's value does
not match any filter typename, or is empty (\fB{}\fR), the dialog box
will revert to the default behavior of selecting the first filter in
the list. If the dialog is canceled, the variable is not modified.
@


1.16
log
@Rendering-with-groff GOOBE.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.15 2005/07/06 22:17:06 hobbs Exp $
d91 10
@


1.15
log
@	* doc/getOpenFile.n: correct -multiple docs (takes boolean)
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.14 2005/04/06 21:11:54 dkf Exp $
d16 1
a17 1
.br
d19 1
@


1.15.2.1
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.15 2005/07/06 22:17:06 hobbs Exp $
a15 1
.nf
d17 1
a18 1
.fi
@


1.15.2.2
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.15.2.1 2007/10/24 12:59:30 dgp Exp $
d16 1
a17 1
.br
d19 1
a90 10
.TP
\fB\-typevariable\fR \fIvariableName\fR
The variable \fIvariableName\fR is used to preselect which filter is
used from \fIfilterList\fR when the dialog box is opened and is
updated when the dialog box is closed, to the last selected
filter. The variable is read once at the beginning to select the
appropriate filter. If the variable does not exist, or it's value does
not match any filter typename, or is empty (\fB{}\fR), the dialog box
will revert to the default behavior of selecting the first filter in
the list. If the dialog is canceled, the variable is not modified.
@


1.15.2.3
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
a15 1
.nf
d17 1
a18 1
.fi
d20 1
d73 5
a82 5
\fB\-multiple\fR \fIboolean\fR
Allows the user to choose multiple files from the Open dialog.
On the Macintosh, this is only available when Navigation Services are
installed.
.TP
d96 1
a96 1
appropriate filter. If the variable does not exist, or its value does
d105 1
a105 1
.PP
d135 1
a135 1
in the sample code matches files that \fIeither\fR have a \fB\.gif\fR
d146 5
a150 13
extensions are:
.IP (1)
the special extension
.QW *
matches any file;
.IP (2)
the special extension
.MT
matches any files that do not have an extension (i.e., the filename
contains no full stop character);
.IP (3)
any character string that does not contain any wild card characters (*
and ?).
d154 4
a157 5
extensions, except as in the special extension
.QW * .
Extensions without a full stop character (e.g.
.QW ~ )
are allowed but may not work on all platforms.
d168 1
a168 1
set filename [tk_getOpenFile \-filetypes $types]
d174 1
d177 1
@


1.15.2.4
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.15.2.3 2007/11/01 16:37:14 dgp Exp $
d44 1
a44 1
any case. This option is ignored on Mac OS X, which
d64 4
a67 1
relative path to an absolute path.
d70 2
a71 1
Specifies a filename to be displayed in the dialog when it pops up.
d75 2
a76 1
This is only available on Mac OS X.
d80 2
d85 1
a85 2
dialog is displayed on top of its parent window. On Mac OS X, this
turns the file dialog into a sheet attached to the parent window.
d124 2
a125 2
distinct type of file. The use of more than one file pattern for one
type of file is only necessary on the Macintosh platform.
d144 1
a144 1
glob-style pattern matching. On the Windows platform, extensions are
@


1.14
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.13 2004/09/19 16:05:37 dkf Exp $
d73 1
a73 1
\fB\-multiple\fR
@


1.13
log
@Standardize style of section refs & public symbols. Remove displayed tabs
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.12 2004/08/20 10:56:36 dkf Exp $
a45 1
.VS 8.4
a47 1
.VE 8.4
@


1.12
log
@Spelling and grammar fixes from Mikhail Kolesnitchenko. [Patch 1012083]
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.11 2004/03/25 12:12:36 vincentdarley Exp $
d58 1
a58 1
types. See the section SPECIFYING FILE PATTERNS below for a
@


1.11
log
@Fix typos in documentation
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.10 2002/04/19 22:16:02 jenglish Exp $
d27 1
a27 1
existing file \fIonly\fR. If the user enters an non-existent file, the
d42 1
a42 1
enters a filename without an extension. The defaut value is the empty
d147 1
a147 1
without a full stop character (e.g, ~) are allowed but may not
@


1.10
log
@Fix for [ 539903 ] Doc error for "-message"
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.9 2001/12/14 14:56:46 dkf Exp $
d131 1
a131 1
if its name matches at at least one of the \fIextension\fR(s) of
@


1.10.2.1
log
@Backport of documentation fixes
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.10 2002/04/19 22:16:02 jenglish Exp $
d27 1
a27 1
existing file \fIonly\fR. If the user enters a non-existent file, the
d42 1
a42 1
enters a filename without an extension. The default value is the empty
d58 1
a58 1
types. See the section \fBSPECIFYING FILE PATTERNS\fR below for a
d131 1
a131 1
if its name matches at least one of the \fIextension\fR(s) of
d147 1
a147 1
without a full stop character (e.g. ~) are allowed but may not
@


1.10.2.2
log
@	* doc/getOpenFile.n: correct -multiple docs (takes boolean)
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.10.2.1 2004/10/28 10:19:29 dkf Exp $
d75 1
a75 1
\fB\-multiple\fR \fIboolean\fR
@


1.9
log
@Added code to guess the correct default extension from whatever value
was selected in the filetypes option menu.  Adapted from code by Chris
Nelson submitted in Patch #492220.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.8 2000/07/25 21:14:35 jenglish Exp $
d80 1
a80 1
\fB\-message\fR
@


1.8
log
@CanvPsY.3, ConfigWidg.3, CrtImgType.3, CrtItemType.3,
FontId.3, GetFont.3, canvas.n, font.n, options.n, text.n:
Documentation fix: Replaced references to XFontStruct *
and Tk_FontStruct with Tk_Font.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.7 2000/06/23 00:22:28 ericm Exp $
d45 5
a49 1
does not require extensions to filenames.
@


1.8.2.1
log
@sync with head
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.9 2001/12/14 14:56:46 dkf Exp $
d45 1
a45 5
does not require extensions to filenames,
.VS 8.4
and the UNIX implementation guesses reasonable values for this from
the \fB\-filetypes\fR option when this is not supplied.
.VE 8.4
@


1.8.6.1
log
@Merge with current TOT
Added support for the wm stackorder command
Fixed crash when selecting Menu items in the Application menu that we didn't
put there.
Added first bits of the use of CG for low-level drawing.  The line-drawing works,
the rest doesn't yet.  You have to set the file static useCGDrawing to 1 and
rebuild to activate this code.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.8 2000/07/25 21:14:35 jenglish Exp $
d45 1
a45 5
does not require extensions to filenames,
.VS 8.4
and the UNIX implementation guesses reasonable values for this from
the \fB\-filetypes\fR option when this is not supplied.
.VE 8.4
@


1.8.6.2
log
@Merging with TOT as of 06/09/2002.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
d80 1
a80 1
\fB\-message\fR \fIstring\fR
@


1.7
log
@* doc/getOpenFile.n: Updated with information about -multiple.

* library/choosedir.tcl: Tweaked to handle modified tkIconList API's.

* library/tkfbox.tcl: Preliminary implementation of multiple
selection; based on patch from [RFE: 604].  Some of the tkIconList
functions changed to support this and to make the dialog faster.

* library/xmfbox.tcl: Added support for multiple selection, from
patch in [RFE: 4999].
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.6 2000/04/23 03:47:13 jingham Exp $
a14 2
.PP
.PP
@


1.6
log
@2000-04-22  Jim Ingham  <jingham@@cygnus.com>

        * mac/tkMacDialog.c (Tk_MacGetOpenFile): Add empty bodies for the 
        "-initialfile" and "-defaultextension" options.
        
        * mac/tkMacDialog.c (NavServicesGetFile): Only cons the result up into
        a list if multiple is true.
        
        * mac/tkMacMenus.c (SourceDialog): Use the "tk_getOpenFile" instead of hand-coding 
        the dialog with StandardGetFile.  This way we get the Navigation dialogs for
        free.
        
        * doc/getOpenFile.n: Document the -multiple and -message flags which are only
        implemented on the Mac.  Also note that the -title works on the Mac with
        Nav Services installed.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.5 2000/01/27 00:23:10 ericm Exp $
d75 2
a76 2
This is only available on the Macintosh, and only when Navigation
Services are installed.
@


1.6.2.1
log
@doc cleanup and clarifications from 8.4aCVS backport
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.8 2000/07/25 21:14:35 jenglish Exp $
d15 2
d75 2
a76 2
On the Macintosh, this is only available when Navigation Services are
installed.
@


1.6.2.2
log
@	* doc/getOpenFile.n: Removed docs for the -multiple and
        -message options that are not provided in Tk 8.3.  They
        are only available in Tk 8.4.  [Bug 461760]
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.5 2000/01/27 00:23:10 ericm Exp $
d70 10
@


1.5
log
@* doc/getOpenFile.n:
* doc/chooseDirectory.n: Man page/cross links for
tk_chooseDirectory (bug #1786).

* library/tk.tcl:
* library/tclIndex: Added hooks for tk_chooseDirectory. (bug #1786)

* library/choosedir.tcl: tk_chooseDirectory implementation for
Unix/Mac (bug #1786).
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.4 1999/12/16 21:57:11 hobbs Exp $
d70 12
a81 1
Specifies a filename to be displayed in the dialog when it pops up.
d89 1
a89 2
option is not specified, then a default title is displayed. This
option is ignored on the Macintosh platform.
@


1.4
log
@	* doc/GetCursor.3:
	* win/tkWinCursor.c: added support for Windows cursors to
	TkGetCursorByName (.ani, .cur) using -cursor @@<filename>
	(Ascher) [Bug: 1350]
	* doc/listbox.n: added doc for <<ListboxSelect>> [Bug: 3500]

	* doc/getOpenFile.n: removed note that -initialfile didn't work
	for tk_getOpenFile
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.3 1998/09/14 18:22:56 stanton Exp $
d154 3
@


1.3
log
@Replaced SCCS strings, fixed binary files
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
d70 1
a70 2
Specifies a filename to be displayed in the dialog when it pops
up. This option is ignored by the \fBtk_getOpenFile\fR command.
@


1.2
log
@Ammended doc to state that the return will always be an absolute path.
@
text
@d7 1
a7 1
'\" SCCS: @@(#) getOpenFile.n 1.8 96/12/08 21:14:31
@


1.1
log
@Initial revision
@
text
@d62 6
a67 4
the files in the current working directory are displayed.  This
option may not always work on the Macintosh.  This is not a bug.
Rather, the \fIGeneral Controls\fR control panel on the Mac allows the
end user to override the application default directory.
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: getOpenFile.n,v 1.3 1998/09/14 18:22:56 stanton Exp $
d62 4
a65 6
the files in the current working directory are displayed. If the
parameter specifies a relative path, the return value will convert the
relative path to an absolute path.  This option may not always work on
the Macintosh.  This is not a bug. Rather, the \fIGeneral Controls\fR
control panel on the Mac allows the end user to override the
application default directory.
@

