Creating a document component using TTilesPresenter

In the previous steps you created a Tiles document component using the stationery class TGUIModelViewStationeryFor<TTilesModel, TTilesView>. This stationery class instantiated a default presenter, TGUIPresenterFor<TTilesView>, to use as the presenter for the document.

To incorporate the custom presenter TTilesPresenter, you need to use a different stationery class to build Tiles document components. The Presentation framework provides a stationery class that lets you easily construct a document component from a model and a presenter--TGUIModelPresenterStationeryFor<AModel, APresenter>. For the Tiles program, you need to instantiate the template class TGUIModelPresenterStationeryFor<TTilesModel, TTilesPresenter>.


You can now create a Tiles document and see the extended menus by compiling the project in the directory $TaligentRoot/TaligentSamples/Supported/Apps/TilesTutorial/05.Menus/Tiles and then calling TilesTutorialApp from the $TaligentSharedLibs directory.

If you want to run the version of the code that builds the menu from an archive, you need to do the following before compiling:

  1. Edit the file TilesModel.h and uncomment the line
      #define USE_ARCHIVES
  2. Create the TilesTutorialLib.archive file, as described in "Working with export files" on page 87

[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