kahlerb
14 years agoNew Contributor
How to control from wich unit a EventHandler recognises Events
Hi there,
im using a OnLogError EventHandler. I want it only to recognise Events wich were thrown by one of my scripting unit.
Is it possible to check the Sender and how could I do this? Or is there an other possibility to do this?
The Eventhandler looks like this
im using a OnLogError EventHandler. I want it only to recognise Events wich were thrown by one of my scripting unit.
Is it possible to check the Sender and how could I do this? Or is there an other possibility to do this?
The Eventhandler looks like this
Sub GeneralEvents_OnLogError(Sender, LogParams)
MessageText = LogParams.Str
If InStr(MessageText, "The window was destroyed during method execution.") Then
Log.Event("Event recognised")
LogParams.Locked = true
End If
End Sub