Initializing and finalizing the view
In addition to requiring a TGUIBundle as an argument in the constructor, the TTilesView class has another requirement--it must override the TDocumentComponentView functions that provide for initialization and finalization of the view. When you implement these functions, you should first call the base class version and then add your own routines:
- HandleAfterConnectionToViewRoot is called by the Presentation framework when the view is added to the view hierarchy--generally just before the view becomes visible. You add any initialization routines for your view class here. For example, this is where TTilesView creates the MGraphic objects it uses to display each kind of tile.
- HandleBeforeDisconnectionFromViewRoot is called by the Presentation framework when the view is removed from the view hierarchy--generally just before the view is destroyed. You add any clean-up routines here. For example, this is where TTilesView destroys the MGraphic objects used to display the tiles.
All classes derived from TDocumentComponentView must override
these functions.
[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