Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
5.  Registering an Application General Steps for Registering an Application Step 4: Creating the Actions and Data Types for the Application Ways to Create Actions and Data Types  Previous   Contents   Next 
   
 

To Create Actions and Data Types Using Create Action

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.

  1. Open the Desktop_Apps application group and double-click Create Action.

  2. 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.

  3. Test the action using the action file created in your home directory.

  4. Copy the action definition file HomeDirectory/.dt/type/action_name.dt to the app_root/dt/appconfig/types/language directory.

  5. 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.

To Create Actions and Data Types Manually

  • 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:

Step 5: Putting the Help Files in the Registration Package


Note - For an example of adding help files to a registration package, see Step 5 of "Example of Creating a Registration Package".


If the application includes a desktop help volume (a help volume created with the desktop Help Developer's Kit), the help volume master file (*.sdl) should be placed in the directory app_root/appconfig/help/language.

Graphics used by the help files are usually placed in a graphics subdirectory. The graphics must be located in the same directory relative to the master help volume (*.sdl) file as when the help volume was created.

If the application does not provide a help volume, you can create one if you have the Help Developer's Kit.

There are two levels of integration of a help volume:

  • Full integration.

    When desktop help is fully integrated, the help volume can be accessed from the application--for example, by on-item help and the Help menu. Full integration involves modification to the application's executables.

  • Partial integration.

    When desktop help is partially integrated, it is available from the top level of the Help Manager. However, you cannot access the help volume from the application's windows. You can also provide an action to access the help from the application group. The following example action displays the help volume located in the help master file MyApp.sdl:

    ACTION OpenMyAppHelp
    {
         LABEL           MyAppHelp
         ARG_COUNT       0
         TYPE            COMMAND
         WINDOW_TYPE     NO_STDIO
         EXEC_STRING     /usr/dt/bin/dthelpview -helpVolume MyApp
         DESCRIPTION     Displays help for the MyApp application.
    }

Step 6: Creating Icons for the Application


Note - For an example of creating the icon files for an application, see Step 6 of "Example of Creating a Registration Package".


The desktop provides default icons for actions, data types, and application groups. However, you will probably want to create unique icons for the application.

Icons are placed in the directory app_root/dt/appconfig/icons/language.

Icons Required for the Desktop

The application uses these icon images on the desktop:

  • Action icon. This is the icon the user double-clicks to start your application (actions). It is referenced in the ICON field of the action that launches the application.

    Supply three sizes: tiny, medium, and large.

  • Data type icon. This icon is used to represent the application's data files in File Manager. It is referenced in the ICON field of the data type definition.

    If your application supports multiple data types, you should provide a different icon for each data type.

    Supply two sizes: tiny and medium.

  • Application group icon. This is the icon representing the directory at the top level of the Application Manager. It is referenced in the ICON field of the data type definition for the application group. (See "Step 7: Creating the Application Group".)

    Supply two sizes: tiny and medium.

    You may need to supply both pixmap and bitmap versions of each icon to support color (eight-bit and larger) and monochrome (fewer than eight bits) displays.

Table 5-2 Naming Conventions for Icon Files

Size

Pixel Dimensions

Bitmap Name

Pixmap Name

tiny

16 by 16

basename.t.bm

basename.t.pm

medium

32 by 32

basename.m.bm

basename.m.pm

large

48 by 48

basename.l.bm

basename.l.pm

If you do not provide bitmap files, the desktop maps the color specifications of the pixmap files into black and white. However, this mapping may not produce the appearance you want.

For more information about icons, see "Icon Image Files".

 
 
 
  Previous   Contents   Next