Class() and TypeOf()
Class()
The class is the name of an object. You assign the name when you save the object in its painter.
ls_class = Lower(adw.ClassName())
In the above script, the class name will be n_ds or u_dw, or n_ds_add_rows. Here is another sample script:
choose case adw_wrkr_tm.ClassName()
case “dw_mach_op”
ls_type = “Direct Time”
case “dw_handwork_press”
ls_type = “Press Handwork”
case “dw_handwork_finishing”
ls_type = “Finishing Handwork”
case “dw_indirect_labor”
ls_type = “Indirect Time”
end choose
TypeOf()
TypeOf reports an object’s built-in object type. The types are values of the Object enumerated data type, such as Window! or CheckBox!. ClassName reports the class of the object in the ancestor-descendant hierarchy.
choose case TypeOf(adw)
case datastore!
lv_rc = TRUE
case else
lb_rc = FALSE
enc choose
If adw is a descendant of datastore!, like n_ds, it is still of TypeOf datastore!
No comments yet.
Leave a comment
-
Archives
- August 2009 (2)
- May 2009 (1)
- March 2009 (1)
- January 2009 (2)
- December 2008 (1)
- November 2008 (2)
- September 2008 (1)
- August 2008 (1)
- July 2008 (24)
- June 2008 (22)
- May 2008 (69)
- April 2008 (25)
-
Categories
-
RSS
Entries RSS
Comments RSS