OverrideProcedure Meta-Tag
See Also: Class Meta-Data Tags
Purpose
Used to specify that the information in this tag set should be applied to the procedure name for this class, where the procedure is an inherited procedure, not one defined in the current class.
Syntax
{ OverrideProcedure={ProcedureName} {ClassMemberMetaDataTagName}=MyValue }
where:
-
{ProcedureName} is the name of the procedure for which to override the value of {ClassMemberMetaDataTagName}.
-
{ClassMemberMetaDataTagName} is the name of the class member meta-data tag to override.
Note: OverrideProcedure must be the first name in the tag set, and all other name/value pairs in the tag set will be applied to ProcedureName.
Use
This is used to change values of class member meta-data tag Visibility for a procedure in a subclass.
Sometimes, the value of a procedure meta-data tag is different in a subclass of the class where the procedure was originally declared. To indicate this, use the OverrideProcedure class meta-data tag.
To declare the meta-data tag value of a procedure that is declared in the current class, use the appropriate class member meta-data tag.
OverrideProcedure must be used to override the value of any class member meta-data tag for procedures in the current subclass. To overwrite the value of functions, properties, or procedure sets, use OverrideFunction, OverrideProperty, or OverrideProcedureSet, respectively. Using the wrong override type will result in an error and/or unexpected behavior.
Example
You can override the visibility of an inherited procedure from a superclass. Setting the Visibility meta-data tag of a procedure to Private can "hide" the procedure from all Studio design-time access, including the Object Properties window (if the procedure is an event) and CodeSense, for the class in which it is overridden.
For example, the following code overrides the visibility of the inherited procedure Test from public (the default) in the superclass cFoo, where it is defined, to private in the subclass cFooSub.
Class cFoo is a cObject
Procedure Test
// method code
End_Procedure
End_Class
{ OverrideProcedure=Test Visibility=Private }
Class cFooSub is a cFoo
End_Class
Of Special Note
The class member meta-data tag values that are set by OverrideProcedure may be inherited. See the documentation for the class member meta-data tag you are overriding to see if it is inherited.