IsClassOfClass - cObject
Determines whether the target class is part of the searched class's hierarchy
Type: Function
Return Data Type: Boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
| iSearchClass | integer | The (potential) superclass |
| iTargetClass | Integer | The subclass |
Syntax
Function IsClassOfClass integer iSearchClass Integer iTargetClass Returns Boolean
Call Example
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
Return Value
This returns True if the class passed as the second parameter, iTargetClass, is part of the class hierarchy of iSearchClass