IsClassOfClass - cObject

Determines whether the target class is part of the searched class's hierarchy

Type: Function

Return Data Type: Boolean

Parameters: Integer iSearchClass Integer iTargetClass

ParameterDescription
iSearchClassThe (potential) superclass
iTargetClassThe subclass


Return Value

This returns True if the class passed as the second parameter, iTargetClass, is part of the class hierarchy of iSearchClass


Syntax
Function IsClassOfClass Integer iSearchClass Integer iTargetClass Returns Boolean

Call: Get IsClassOfClass iSearchClass iTargetClass to BooleanVariable


Description

This returns True if the class passed as the second parameter, iTargetClass, is part of the class hierarchy of iSearchClass. This allows you to test class hierarchies without having to create an actual object. In most cases, IsObjectOfClass will be the more useful method.

Integer iClass
Boolan bIsGrid bIsList

Get ObjectClass to iClass

Get IsClassOfClass iClass (RefClass(cWebGrid)) to bIsGrid
Get IsClassOfClass iClass (RefClass(cWebList))  to bIsList

If bIsGrid Begin
   // customize for grid
End
Else If bIsList Begin
   // customize for list
End
Else Begin
   // customize for unknown
End

See Also

Name | Object_Id | Object_Label | ObjectClass | IsObjectOfClass | ClassSuperClass