O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading Option Database Files

The option command manipulates the resource database. The first form of the command loads a file containing database entries:

option readfile filename ?priority?
					

The priority distinguishes different sources of resource information and gives them different priorities. Priority levels are numeric, from 0 to 100. However, symbolic names are defined for standard priorities. From lowest to highest, the standard priorities are widgetDefault (20), startupFile (40), userDefault (60), and interactive (80). These names can be abbreviated. The default priority is interactive.

Example 28-1 Reading an option database file.
if [file exists $appdefaults] { if [catch {option readfile $appdefaults startup}err] { puts stderr "error ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required