| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (4 out of 5)

Managing User Preferences

GMS predefines one User Preferences object, called the system default preferences object. This object specifies system default preferences that give good results when no other preferences apply to a user. All attributes of the system default preferences object have the values shown in the previous table for User Preferences objects generally.

Obtaining the Current User Preferences Object

The current User Preference object holds the setting that are presently in place in a given G2 window.

To obtain the current User Preferences object:

Creating a User Preferences Object

If the system default preferences do not provide what you need, you can create your own User Preferences object and give its attributes the needed values.

To create a new User Preferences object:

or:

To specify user preferences:

or:

Registering Individual User Preferences

After you create and customize a User Preferences object, you can specify that the preferences it specifies apply to an individual user. GMS binds a user to a Preferences Object via the user's login name.

To specify that a User Preferences object applies to a particular user:

or:

Any number of users can register for the same User Preferences object. No user can be registered for more than one at a time. When a user already registered for one User Preferences object registers for another, GMS automatically unregisters the user from the previous object. You can also unregister a user from any User Preferences object.

To specify that no User Preferences object applies to a particular user:

Specifying Generic User Preferences

You can also specify a generic user preferences object. This object shadows the system default preferences object, and supplies user preferences for all users who are not registered for any other preferences object.

To specify a generic User Preferences object:

Multiple objects can exist whose Gms-applicability is default. You can use the Gms-priority attribute to indicate the object GMS uses.

To indicate the User Preferences object to use when more than one exists:

When more than one object exists with the highest priority, GMS chooses one at random.

Searching for User Preferences

When more than one User Preferences object exists, GMS searches for the correct object to use. The order of the search is:

  1. Look for a User Preferences object for which the current user is registered.

  2. Look for a generic User Preferences object. If more than one exists, use the one with the highest priority, or one selected at random from among those with the highest priority.

  3. Use the system default preferences object.

Changing the User Preferences Currently in Effect

You can change user preferences in various ways while the user is logged in, as described under Managing User Preferences.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (4 out of 5)

Copyright © 1997 Gensym Corporation, Inc.