Constructs related to ::tycho::FileBrowser


Related class: ::tycho::FileBrowser Contents: Proc

Proc

::tycho::queryfilename {string {default {}}}
Query the user for a filename and return it. This procedure brings up a file browser, and returns only when that file browser is dismissed. The first argument is a text string used as a label in the file browser. The optional second argument is an initial filename to display in the entry box. If it is not specified, then the most recently used file name is displayed instead.

This procedure indirectly calls update, a Tk utility that processes pending events, including mouse events. If this procedure is called from within an Itcl object, directly or indirectly, it may be necessary to take precautions to prevent the calling object from being deleted during the call. Because of a defect in at least some versions of Itcl, failure to do so can result in catastrophic failure of the application (a core dump). In Tycho objects, the safeEval method should be used to evaluate this procedure or any method or procedure that in turn calls this procedure. If the procedure is called from the top level or from a Tcl procedure that is not itself called from within an Itcl object, then there is no cause for worry.

Index of classes



Author: Edward A. Lee
Contributor: Based on a Tcl/Tk version by Wei-Jen Huang and Mario Jorge Silva. Version: @(#)FileBrowser.itcl 1.43 12/15/96
Copyright: (c) 1990-1996 The Regents of the University of California.