cCompositeControls Object Members


When cCompositeControls is instanced, instances of cControlManager are created corresponding to the types of controls used. This provides intelli-sense friendly referencing of the individual controls and allows different control types to be grouped under separate instances of the cControlManager class.

The cCompositeControls instance also provides a global collection which is used to store a reference to each object that is a part of the Composite Controls object model. This is useful in debugging memory leaks and ensuring all objects are properly destroyed.

Finally, the class instance provides a place to add custom code to manage the creation / destruction of Composite Control objects. Often, one object may require active references to other Composite Controls objects (i.e., a custom control will require an event handler control for it's parent form). Rather than create a litany of circular references between the classes so that the classes can instantiate one another as needed, it is preferrable to manage this sort of work at the highest level and outside the classes requiring the extra references. This significantly simplifies managing object creation and destruction and reduces debugging time.

The cCompositeControls instance is created and initialized on application startup, before forms requiring composite controls are loaded.

Code Modules

Name Standard / Class Description
cCompositeControls.cls Class Class module for the cCompositeControls class.

Methods

Name Description
Initialize Initializes the cCompositeControls object.
regRef Adds a Composite Controls object reference to the global object references collection.
Terminate Terminates the cCompositeControls object.

Properties

Name Description
cCompositeControlManager Property Returns a member instance of the cCompositeControlManager class.
gObjectReferences Returns a reference to the global object references collection which maintains a reference to every Composite Controls class instance.
Tag Stores unique identifier for object.

Last edited Dec 25, 2010 at 11:16 AM by vba_junkie, version 1

Comments

No comments yet.