Check if an event is supported by an objectTag(s): Powerscript

any la_rc
integer li_rc
la_rc = my_uo.event dynamic ue_someevent()
IF IsNull(la_rc) THEN
    // action if event does not exist
ELSE
    li_rc = la_rc
    // action based on return value
END IF

Using PFC

n_cst_metaclass lnv_metaclass   
IF lnv_metaclass.of_IsEventDefined(my_uo.ClassName(), 'ue_someevent') THEN
    li_rc = my_uo.event dynamic ue_someevent()
    // action based on return value
ELSE
    // action if event not defined
END IF



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]