User Tools

Site Tools


rulemanager_concepts.htm
Navigation:  ABC Library Reference > RuleManager >====== RuleManager Concepts ====== Previous pageReturn to chapter overviewNext page

Rule Manager is implemented by a set of three classes:

·The Rule CLASS stores the definition of, and provides a method for testing, a single rule.

·The RulesCollection CLASS manages a collection of related rules, and provides methods for defining those rules, testing them singly or jointly, counting and/or displaying broken rules, and hiding or disabling controls when one or more rules is broken.

·The RulesManager CLASS manages multiple instances of RulesCollection.

These objects work together to implement Rule Manager features.

A Collection Class of Rules

A RulesCollection object is a collection class that is composed of an indefinite number of Rule objects. Each Rule object contains a single expression which when evaluated indicates whether the rule is broken or not. Rules can be explicitly checked by name, numeric id or all at once.

Visual Indicators

Each Rule object within the RulesCollection object has the option of displaying a small button with an image next to a specified control when the rule has been checked and found to be broken.

Evaluation of rules

When a rule is checked, the EVALUATE() function is called internally by the RuleUsBroken() method. Therefore all variables used by a BrokenRulesManager object need to be explicitly bound. If the result of the EVALUATE() returns FALSE, it means that the rule has been broken.

Responding to Broken Rules

RulesCollection provides the ability to keep a tally or how many rules are broken at one time. It does not explicitly re-check all the rules, but rather counts all the rules that have already been flagged as broken. This will provide you with a single, clean reference for determining whether a procedure is in a valid state or not.

Rule Manager Relationship to Other Application Builder Classes

The Rule Manager Classes work in conjunction with the WindowManager Class to provide visual error indicators. Template-placed code allows Rule Manager to work within the ACCEPT loop of WindowManager to handle events related to error indicators.

rulemanager_concepts.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1