Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Class(y) - <b>method</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 METHOD
 Declare method(s) with same named message(s)
------------------------------------------------------------------------------

 Syntax:

    METHOD <method name list> [CONSTRUCTOR | CTOR | DEFERRED | NULL]

 Arguments:

    <method name list> is a list of methods to be declared.  Each
    such method should be defined later in the same module using
    the METHOD FUNCTION or METHOD PROCEDURE commands.

 Description:

    This command is used within a class declaration to declare one or more
    methods for that class.  Once the class containing these methods has
    been created, any of the methods declared with this command can be
    invoked by sending a message of the same name as the method to an
    instance of the class.

    With Class(y), the name of a message and the name of the associated
    method is usually the same.  See the MESSAGE...METHOD command for
    information about declaring messages whose methods have a different
    name.

    It is strongly recommended that methods declared using this syntax are
    defined in the same program module as the class declaration.  See the
    section External Methods for alternatives.

    Note that this form of the METHOD command is only valid inside a
    class declaration (CREATE CLASS...END CLASS block).  The METHOD
    command used outside a class declaration is an abbreviated form of the
    METHOD FUNCTION command.

    If the optional CONSTRUCTOR clause is included (or its abbreviation
    CTOR), then the method and its associated message are flagged as a
    constructor method and message respectively. See Constructor Messages
    and Methods for more information.

    If either of the optional equivalent clauses DEFERRED or NULL
    is included, the specified method(s) will be flagged as such.  See the
    section on Deferred Methods and Null Methods for more information.

    Note that NULL or DEFERRED methods do not need to be defined (using
    METHOD FUNCTION or METHOD PROCEDURE) in the class where they are
    declared.  They are usually redeclared and defined in a subclass.

See Also: MESSAGE...METHOD METHOD [FUNCTION] External Methods Constructor Messages and Methods

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson