For an example of creating the actions and data types for an application, see Step 4 of Example of Creating a Registration Package.
Actions and data types provide a user interface for the application.
Actions provide a user interface for the command to launch the application.
Data types provide customized appearance and behavior for the application's data files.
Typical applications require the following action and data type definitions:
An action that opens the application.
A data type for the data files of your application. If you create a data type, you will also want to create:
An Open action for the data files of your application
A Print action for the data files of your application
A data type for the application group (see Configuring the Application Group To Use a Unique Icon).
For an introduction to how actions and data types are used in the desktop, see Chapter 10, Introduction to Actions and Data Types .
Actions and data types are defined in configuration files. The only naming requirement for files containing action and data type definitions is that they must have a .dt suffix. By convention, you may want to name the file action_name.dt or application_name.dt.
Place files containing actions and data types under the application root in the directory app_root/dt/appconfig/types/language. The default language is C.
You can create action and data type definitions for an application in either of two ways:
Use the Create Action tool.
Create Action provides an easy-to-use interface with text fields that you fill in. However, the tool has certain limitations.
Create the definitions manually.
This requires you to learn the syntax for creating the definitions, but provides access to the full range of functionality.
This procedure uses the Create Action utility to create an action and data types for the application.
For more information about Create Action, use its online help or see Chapter 11, Creating Actions and Data Types Using Create Action.
Open the Desktop_Apps application group and double-click Create Action.
Use Create Action to create the action and data type definitions for the application and its data type.
The configuration file created by Create Action will be written to HomeDirectory/.dt/type/action_name.dt. The action file (the executable file with the same name as the action) is placed in your home directory.
Test the action using the action file created in your home directory.
Copy the action definition file HomeDirectory/.dt/type/action_name.dt to the app_root/dt/appconfig/types/language directory.
After the application group directory has been created (see Step 7: Creating the Application Group), copy the action file HomeDirectory/action_name to the app_root/dt/appconfig/appmanager/language/appgroup_name directory.
Create a configuration file containing the action and data type definitions for the application.
Action and data type definition files must follow the naming convention name.dt.
You can place all your action and data type definitions in one file or distribute them among multiple files. For each file, use a file name that system administrators will easily connect with your application.
Action and data type names must be one word (no embedded spaces). You can use an underscore character. By convention, the first letter of the action or data type name is capitalized. Do not use an existing action name or file name. Use a name that advanced users and system administrators will easily connect with your application.
If you want the application's icon labeled with a different name than the action name, include a LABEL field in the action definition.
For more information about creating actions and data types, see: