::mdlTempFileName

This command creates a widget that represents a filename value that is referenced by a variable (not a data member of an entity).

Syntax

::model::mdlTempFileName path variable openFile args

Application

MotionView Tcl GUI

Description

This command creates a widget that represents a filename value that is referenced by a variable (not a data member of an entity).

Inputs

path
The full name of the path that is to be used by the mdlTempFileName widget.
variable
The Tcl variable that will be used to store and retrieve the selected filename value.
openFile
The Boolean flag that determines whether the widget is for opening a file (the selected file must exist) or saving a file (the selected file does not need to exist, but the user is warned if it does).
args
A list of arguments to further configure the mdlTempFileName widget.

Example

To create a dialog that will contain an mdlTempFileName widget (to save a file) whose name is stored in a variable:
namespace eval ::my_sample {
  variable fn ""
}
set tl [toplevel .top]
wm geometry $tl 400x100
wm title $tl "Example mdlTempFileName Widget"
grid rowconfigure $tl 0 -weight 1
grid columnconfigure $tl 0 -weight 1

set tmpFN [::model::mdlTempFileName $tl.tmpFN ::my_sample::fn 0]
grid $tmpFN -row 0 -column 0 -sticky new

Errors

None.