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>external methods</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
    External Methods
------------------------------------------------------------------------------

    An external method is a method which is defined in a different module
    from the one in which its class declaration appears.

    This could be done for a number of reasons:

    .   To have a single method which applies to a number of different
        classes.  In most cases, however, such methods would be better
        implemented in a parent class from which all classes requiring that
        method are inherited, directly or indirectly.

    .   To implement a method in a C or assembler module.

    .   To prevent a method from being linked in automatically.  This is
        not a recommended practice.  See the section Linking of classes.

    External methods should be declared in the class which they belong
    using the MESSAGE...METHOD command.

    They should be defined (using the METHOD FUNCTION or METHOD PROCEDURE
    commands) in a separate module which does not contain a class
    declaration.  Since such methods then automatically have public scope,
    they should be given names that will not conflict with any other names
    in the application.  To cause an external method to be linked into an
    application, you must include a Clipper EXTERNAL declaration with the
    name of the method either in the module containing that method's class
    declaration, or in the module which invokes the method.

See Also: MESSAGE...METHOD METHOD [FUNCTION] Linking of Classes

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