ClassSuperClass - cObject

Returns the superclass of the passed class

Type: Function

Return Data Type: Integer

Parameters: Integer iClass

ParameterDescription
iClassThe class id to get the superclass for


Return Value

Superclass id of the passed class


Syntax
Function ClassSuperClass Integer iClass Returns Integer

Call: Get ClassSuperClass iClass to IntegerVariable


Description

This returns the superclass of the passed class. This allows you to determine a classes' hierarchy. If the ID is illegal this returns -1. If there is no superclass (e.g., cObject) it returns 0.

Integer iClass iSuperClass

Get ClassSuperClass (RefClass(cApplication)) to iSuperClass
Get ObjectClass to iClass

While iClass
    Get ClassSuperClass iClass to iSuper
    Showln "Class ID="  iClass   ".  Superclass="  iSuper
    Move iSuper to iClass
Loop

See Also

Name | Object_Id | Object_Label | ObjectClass | ClassSuperClass | IsClassOfClass