When a macro is attached to an event (e.g. losing focus), it is unclear to me whether it runs before or after the event has been processed, and whether one can influence this. Referring to a previous database application (Paradox), one could use a command ‘DoDefault’ at either the beginning or the end of the macro to control the order of execution (including ‘DisableDefault’ if one wanted to cancel an event). Does LO have any equivalent mechanism?
I have noticed from other posts that certain events/macros in LO Base run twice. Again, in Paradox, this was explicit as an event was received by the form, acted upon or sent to the target, and then acted on again as it bubbled up afterwards. This could be managed by the statement
if eventInfo.isPrefilter then [actions to be handled by target]
else [actions to be handled by form]
endif
I suppose that one might find out what is happening with LO by setting a counter (as a global variable outside the macro) which is incremented each time it is run and could perform actions conditional on whether the counter has an even or odd number - ?