| Navigation: ABC Library Reference > RuleManager > Rule Class Methods >====== Rule Class Methods ====== | ![]() ![]() |
Access Methods
Although all of the properties of the Rule class are PRIVATE, public access to these properties is provided by a set of methods:
GetName( ) returns a STRING containing the Name property.
GetExpression( ) returns a STRING containing the Expression property
GetControlNum( ) returns a LONG containing the ControlNum Property
GetDescription( ) returns a STRING containing the Description property
GetErrorIndicator( ) returns a LONG containing the ErrorIndicator property
GetErrorImage( ) returns a STRING containing the ErrorImage property
GetIsBroken( ) returns a LONG containing the IsBroken property
GetOffsetRight( ) returns a LONG containing the OffsetRight property
SetName( string ) sets the Name property
SetExpression( string ) sets the Expression property
SetControlNum( value ) sets the ControlNum property
SetDescription( string ) sets the Description property
SetErrorIndicator( value ) sets the ErrorIndicator property
SetErrorImage( string ) sets the ErrorImage property
SetIsBroken( value ) sets the IsBroken property
SetOffsetRight( value ) sets the OffsetRight property
Setxxx/Getxxx Sets or retrieves a property
| string | A string constant, variable, EQUATE, or expression that contains a value appropriate to the property being set. |
| value | A LONG constant, variable, EQUATE, or expression that contains a value appropriate to the property being set. |
Example:
| RulesCollection.AddRule PROCEDURE(STRING RuleName,STRING RuleDescription,| |
| STRING RuleExpression,<;LONG ControlNum>,| |
| LONG OSR=3) |
| Counter LONG |
| Found BYTE |
| CODE |
| SELF.BrokenRuleQueue.BrokenRuleInstance &= NEW(Rule) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetName(RuleName) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetExpression(RuleExpression) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetDescription(RuleDescription) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetErrorImage(SELF.ErrorImage) |
| IF ~OMITTED(5) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetControlNum(ControlNum) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetErrorIndicator(ControlNum+1000) |
| SELF.BrokenRuleQueue.BrokenRuleInstance.SetOffsetRight(OSR) |
| END |
| ADD(SELF.BrokenRuleQueue) |




