ClassSuperClass - cObject

Returns the superclass of the passed class

Type: Function

Return Data Type: Integer

Parameters: Integer iClass

iClassThe class id to get the superclass for

Return Value

Superclass id of the passed class

Function ClassSuperClass Integer iClass Returns Integer

Call: Get ClassSuperClass iClass to IntegerVariable


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

See Also

Name | Object_Id | Object_Label | ObjectClass | ClassSuperClass | IsClassOfClass