Skip to content

ClassSuperClass - cObject

Returns the superclass of the passed class

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
iClass integer The class id to get the superclass for

Syntax

Function ClassSuperClass integer iClass Returns Integer

Call Example

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

Return Value

Superclass id of the passed class