Launching a document

The final step is to build the project and launch a document created from the stationery you defined. To build the project, move to the directory containing the project and compile the project by typing the following at your AIX console:

      cd $TaligentRoot/TaligentSamples/Supported/Apps/TilesTutorial/01.ModelView/Tiles
      Makeit
The PinkMake file included in the Tutorial directory causes the Tiles program to be built into a shared library called TilesTutorialLib. This library--TilesTutorialLib--is put into your $TaligentSharedLibs directory, and the export list, named TilesTutorialLib.e is put into your $TaligentExports directory.

After compiling the project, you're ready to launch a document.

NOTE For information on PinkMake files, see Taligent Tools for AIX.

The easiest way to launch a document is to use RunDocument, a command line program that has the same effect as double-clicking and tearing off a piece of stationery in the Workspace. When you use RunDocument to launch a document, you don't need to create a main() function for that project. RunDocument is described in Taligent Tools for AIX. You need to be in the $TaligentSharedLibs directory to call RunDocument.

To launch a document, you specify the name of the stationery class and the name of the package associated with the shared library containing the code for the stationery class. To create your first document, you need to use two options, -c and -o. Option -c creates a new document from the specified stationery. Option -o opens a new or existing document. Using them together, creating and opening, is like tearing off a piece of stationery.

For example, to create and open a document called MyTiles using the library TilesTutorialLib:

      cd $TaligentSharedLibs
      RunDocument -c "TGUIModelViewStationeryFor<TTilesModel,TTilesView>" TilesPKG -o MyTiles &
If you don't give the document a name, RunDocument creates a document called Untitled.

The PinkMake file included in the Tutorial directory also builds the RunDocument command line for creating a Tiles document into an executable script called TilesTutorialApp and puts it into the $TaligentSharedLibs directory. To create and open a document called MyTiles you can just type in the following at your AIX console:

      cd $TaligentSharedLibs
      TilesTutorialApp MyTiles &
This will reopen the document MyTiles if it already exists. If you don't specify a document name, this also creates a document called Untitled.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker