MethodType Meta-Tag

See Also: Class Member Meta-Data Tags

Purpose

Used to override the natural type of the class member being declared in the current class.

Applies To

Properties, Procedures and Functions

Syntax

{ MethodType={TypeName} }

where {TypeName} can be one of:

The default is determined by the token being declared. For example, the default for a Function declaration is Function.

Use

Usually, this is used to specify that a Procedure Set or Function is considered to be part of a Property declaration, or that a Procedure or Function is considered to be an Event method.

Example:

This sample code shows how to indicate that a Procedure Set method is a property declaration. It declares a property with the same name a the method name, in this case, psFirstName.

Class cContact is a cObject

 

    Procedure Construct_Object

        forward send Construct_Object

 

        { Visibility=Private }

        Property String psPrivateFirstName

    End_Procedure

 

    { MethodType=Property }

    Procedure Set psFirstName String sFirstName

        set psPrivateFirstName to "John"

    End_Procedure

 

End_Class

Of Special Note