| opEventList | output | longchar | A comma separated list of named events that are implemented (= code exists) in the customization code. A customized event is typically formatted as follows: "<BusinessComponentCode>.<MethodName>.[before|after]". For example: "BCurrency.InitialValues.Before" is an event that implements the hook that will be called right before the standard program code executes InitialValues() in BCurrency. |
BLF
for each tCustomizedComponent:
do transaction on error undo, leave on stop undo, leave:
vhCust = ?.
run value (tCustomizedComponent.tcFullPath)
persistent set vhCust (input ?, input ?) no-error.
end.
if valid-handle (vhCust)
then do viFcCount1 = num-entries(vhCust:internal-entries) to 1 by -1:
vcevent = "(" + string(tCustomizedComponent.tiPathEntry) + ") " + entry(viFcCount1,vhCust:internal-entries).
if num-entries(vcevent,".") = 3
then if vlFirst
then assign opEventList = vcevent
vlFirst = no.
else if lookup (vcevent,opEventList) = 0
then assign opEventList = opEventList + "," + vcevent.
end.
if valid-handle (vhCust)
then if not tCustomizedComponent.tcComponentName begins "bcustom["
then do:
run value ("appinfo/" + lc(tCustomizedComponent.tcComponentName) + "version.p")
(output viClassMajorVersion,
output viClassMinorVersion) no-error.
vcCustomizationVersion = "*NotAvailable*".
vcCustomizationVersion = dynamic-function ("CheckVersion" in vhCust) no-error.
if vcCustomizationVersion <> string(viClassMajorVersion) + "." + string(viClassMinorVersion)
then assign opEventList = opEventList
+ (if vlFirst then "" else ",")
+ "(" + string(tCustomizedComponent.tiPathEntry) + ") " + tCustomizedComponent.tcComponentName
+ substitute(":ERROR:Version mismatch (&1 should be &2).",
vcCustomizationVersion,
string(viClassMajorVersion) + "." + string(viClassMinorVersion))
vlFirst = no.
end.
if valid-handle (vhcust)
then delete procedure vhCust.
else do viFcCount1 = 1 to error-status:num-messages:
vcFcMaskList = error-status:get-message(viFcCount1).
opEventList = opEventList
+ (if vlFirst then "" else ",")
+ "(" + string(tCustomizedComponent.tiPathEntry) + ") " + tCustomizedComponent.tcComponentName
+ ":ERROR:" + replace (vcFcMaskList,",",";").
vlFirst = no.
end.
end.