1. Introducing the ToolTalk Service
2. An Overview of the ToolTalk Service
4. Setting Up and Maintaining the ToolTalk Processes
5. Maintaining Application Information
6. Maintaining Files and Objects Referenced in ToolTalk Messages
7. Participating in ToolTalk Sessions
Querying for Specific Specs in a File
Managing Object and File Information
Managing Files that Contain Object Data
Managing Files that Contain ToolTalk Information
An Example of Object-Oriented Messaging
13. Managing Information Storage
A. Migrating from the Classing Engine to the ToolTalk Types Database
B. A Simple Demonstration of How the ToolTalk Service Works
To instruct the ToolTalk service to deliver messages to your objects, you create a spec that identifies the object and its otype. lists the ToolTalk functions you use to create and write object spec.
Table 12-1 Functions to Create
|
To create an object spec in memory and obtain an objid for the object, use tt_spec_create.
To assign an otype for the object spec, use tt_spec_type_set. You must set the type before the spec is written for the first time. It cannot be changed.
Note - If you create an object spec without assigning an otype or with an otype that is unknown to the ToolTalk Types Database, messages addressed to the object cannot be delivered. (The ToolTalk service does not verify that the otype you specified is known to the ToolTalk Types Database.)
You can determine what properties you want associated with an object; you add these properties to a spec. The ToolTalk service recognizes that it is not always possible to store information in your own internal data; for example, the objid for objects in plain ASCII text files. You can store the location of the objid in a spec property and then use this location to identify where the object is in your tool's internal data structures.
The spec properties are also a convenience for the user. A user may want to associate properties (such as a comment or object name) with the object that they can view later. Your application or another ToolTalk-based tool can search for and display these properties for the user.
To store properties in a spec, use tt_spec_prop_set.
To add to the list of values associated with the property, use tt_spec_prop_add.