The scenario in this section is intended to illustrate how the ToolTalk service can be used in an application-level program that interprets user requests; it is not intended to illustrate how the Common Desktop Environment product implements the ToolTalk service to interpret user requests.
A common user requirement for a graphic user interface (GUI) front-end is the ability to have data files be aware (or "know") of their applications. To do this, an application-level program is needed to interpret the user's requests. Examples of application-level programs (known as smart desktops) are the Apple Macintosh finder, Microsoft Windows File Manager, and the Common Desktop Desktop File Manager. The key common requirements for smart desktops are:
Takes a file
Determines its application
Invokes the application
The ToolTalk Service provides additional flexibility by allowing classes of tools to edit a specific data type. The following scenario illustrates how the Desktop Services Message Set might be implemented as a smart desktop transparent to the end-user.
Diane double-clicks on the File Manager icon.
The File Manager opens and displays the files in Diane's current directory.
Diane double-clicks on an icon for a data file.
The File Manager requests that the file represented by the icon be displayed. The File Manager encodes the file type in the display message.
The ToolTalk session manager matches the pattern in the display message to a registered application (in this case, the Icon Editor), and finds an instance of the application running on Diane's desktop.
If the ToolTalk session manager does not find a running instance of the application, it checks the statically-defined process types (ptypes) and starts an application that best matches the pattern in the message. If none of the ptypes matches, the session manager returns failure to the File Manager application.
The Icon Editor accepts the display message, de-iconifies itself, and raises itself to the top of the display.
Diane manually edits the file.