Previous section   Next section

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

Table of Contents
Part V.  Tk Details

Chapter 42. Managing User Preferences

This chapter describes a user preferences package. The resource database stores preference settings. Applications specify Tcl variables that are initialized from the database entries. A user interface lets the user browse and change their settings.

User customization is an important part of any complex application. There are always design decisions that could go either way. A typical approach is to choose a reasonable default, but then let users change the default setting through a preferences user interface. This chapter describes a preference package that works by tying together a Tcl variable, which the application uses, and a resource specification, which the user sets. In addition, a user interface is provided so that the user need not edit the resource database directly.

      Previous section   Next section