Check If An Object Inherits In PowerBuilder gf_check_inherits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
//check if an object inherits //Function : gf_check_inherits //Parameter : Powerobject apo_check Boolean lb_return = False ClassDefinition lcd_class_def If IsNull(apo_check) Then Return False If Not IsValid(apo_check) Then Return False If IsNull(apo_check.ClassDefinition) Then Return False If Not IsValid(apo_check.ClassDefinition) Then Return False lcd_class_def = apo_check.ClassDefinition Do While Not IsNull(lcd_class_def) And IsValid(lcd_class_def) If Upper(lcd_class_def.Name) = Upper(as_class_name) Then lb_return = True Exit End If lcd_class_def = lcd_class_def.Ancestor Loop Return lb_return |
Good Luck!
Subscribe
Login
0 Comments
Oldest